src/transformers/models/tapas/tokenization_tapas.py/TapasTokenizer/_get_num_rows
class TapasTokenizer:    def _get_num_rows(self, table, drop_rows_to_fit):
        num_rows = table.shape[0]
        if num_rows >= self.max_row_id:
            if drop_rows_to_fit:
                num_rows = self.max_row_id - 1
            else:
                raise ValueError("Too many rows")
        return num_rows