import itertools
import json
import linecache
import os
import pickle
import re
import socket
import string
from collections import Counter
from logging import getLogger
from pathlib import Path
from typing import Callable, Dict, Iterable, List

import git
import torch
from torch.utils.data import Dataset

from transformers import BartTokenizer, RagTokenizer, TaTokenizer




def        lowerCAmelCase_			(					__A,  __A,  __A,  __A,  __A=True,  __A="pt"							)					->    Optional[Any]:







      '''simple docstring'''


      UpperCAmelCase__								=  {"add_prefix_space": True} if isinstance(__A,  __A							) and not line.startswith(" "							) else {}
      UpperCAmelCase__								=  padding_side
      return tokenizer(
          [line],  max_length=__A,  padding="max_length" if pad_to_max_length else None,  truncation=__A,  return_tensors=__A,  add_special_tokens=__A,  **__A,  )




def        lowerCAmelCase_			(					__A,  __A,  __A=None,  )					->    Any:







      '''simple docstring'''


      UpperCAmelCase__								=  input_ids.ne(__A							).any(dim=0							)
      if attention_mask is None:
            return input_ids[:, keep_column_mask]
      else:
            return (input_ids[:, keep_column_mask], attention_mask[:, keep_column_mask])





class 					A							(    UpperCAmelCase_					):


   def __init__(self					:						str	,  __UpperCAmelCase					:						Union[str, Any]	,  __UpperCAmelCase					:						Optional[int]	,  __UpperCAmelCase					:						Any	,  __UpperCAmelCase					:						Tuple	,  __UpperCAmelCase					:						Any="train"	,  __UpperCAmelCase					:						str=None	,  __UpperCAmelCase					:						Optional[Any]=None	,  __UpperCAmelCase					:						Any=None	,  __UpperCAmelCase					:						Any=""	,  )						->    Optional[Any]:
         """simple docstring"""



         super().__init__()
         UpperCAmelCase__								=  Path(__UpperCAmelCase		).joinpath(type_path + ".source"		)
         UpperCAmelCase__								=  Path(__UpperCAmelCase		).joinpath(type_path + ".target"		)
         UpperCAmelCase__								=  self.get_char_lens(self.src_file		)
         UpperCAmelCase__								=  max_source_length
         UpperCAmelCase__								=  max_target_length
         assert min(self.src_lens		) > 0, f"""found empty line in {self.src_file}"""
         UpperCAmelCase__								=  tokenizer
         UpperCAmelCase__								=  prefix
         if n_obs is not None:
               UpperCAmelCase__								=  self.src_lens[:n_obs]
         UpperCAmelCase__								=  src_lang
         UpperCAmelCase__								=  tgt_lang


   def __len__(self					:						List[str]		)						->    Any:
         """simple docstring"""



         return len(self.src_lens		)


   def __getitem__(self					:						str	,  __UpperCAmelCase					:						Union[str, Any]		)						->    Dict[str, torch.Tensor]:
         """simple docstring"""



         UpperCAmelCase__								=  index + 1  # linecache starts at 1
         UpperCAmelCase__								=  self.prefix + linecache.getline(str(self.src_file		)	,  __UpperCAmelCase		).rstrip("\n"		)
         UpperCAmelCase__								=  linecache.getline(str(self.tgt_file		)	,  __UpperCAmelCase		).rstrip("\n"		)
         assert source_line, f"""empty source line for index {index}"""
         assert tgt_line, f"""empty tgt line for index {index}"""

         # Need to add eos token manually for T5
         if isinstance(self.tokenizer	,  __UpperCAmelCase		):
               source_line += self.tokenizer.eos_token
               tgt_line += self.tokenizer.eos_token

         # Pad source and target to the right
         UpperCAmelCase__								=  (
             self.tokenizer.question_encoder if isinstance(self.tokenizer	,  __UpperCAmelCase		) else self.tokenizer
         )
         UpperCAmelCase__								=  self.tokenizer.generator if isinstance(self.tokenizer	,  __UpperCAmelCase		) else self.tokenizer

         UpperCAmelCase__								=  encode_line(__UpperCAmelCase	,  __UpperCAmelCase	,  self.max_source_length	,  "right"		)
         UpperCAmelCase__								=  encode_line(__UpperCAmelCase	,  __UpperCAmelCase	,  self.max_target_length	,  "right"		)

         UpperCAmelCase__								=  source_inputs["input_ids"].squeeze()
         UpperCAmelCase__								=  target_inputs["input_ids"].squeeze()
         UpperCAmelCase__								=  source_inputs["attention_mask"].squeeze()
         return {
             "input_ids": source_ids,
             "attention_mask": src_mask,
             "decoder_input_ids": target_ids,
         }


   @staticmethod
   def       lowercase_				(__UpperCAmelCase					:						str		)						->    Tuple:
         """simple docstring"""



         return [len(__UpperCAmelCase		) for x in Path(__UpperCAmelCase		).open().readlines()]





   def       lowercase_				(self					:						Optional[Any]	,  __UpperCAmelCase					:						List[str]		)						->    Dict[str, torch.Tensor]:
         """simple docstring"""



         UpperCAmelCase__								=  torch.stack([x["input_ids"] for x in batch]		)
         UpperCAmelCase__								=  torch.stack([x["attention_mask"] for x in batch]		)
         UpperCAmelCase__								=  torch.stack([x["decoder_input_ids"] for x in batch]		)
         UpperCAmelCase__								=  (
             self.tokenizer.generator.pad_token_id
             if isinstance(self.tokenizer	,  __UpperCAmelCase		)
             else self.tokenizer.pad_token_id
         )
         UpperCAmelCase__								=  (
             self.tokenizer.question_encoder.pad_token_id
             if isinstance(self.tokenizer	,  __UpperCAmelCase		)
             else self.tokenizer.pad_token_id
         )
         UpperCAmelCase__								=  trim_batch(__UpperCAmelCase	,  __UpperCAmelCase		)
         UpperCAmelCase__		,				UpperCAmelCase__								=  trim_batch(__UpperCAmelCase	,  __UpperCAmelCase	,  attention_mask=__UpperCAmelCase		)
         UpperCAmelCase__								=  {
             "input_ids": source_ids,
             "attention_mask": source_mask,
             "decoder_input_ids": y,
         }
         return batch




UpperCamelCase__    							= getLogger(__name__)




def        lowerCAmelCase_			(					__A							)					->    Dict:







      '''simple docstring'''


      return list(itertools.chain.from_iterable(__A							)							)




def        lowerCAmelCase_			(					__A							)					->    None:







      '''simple docstring'''


      UpperCAmelCase__								=  get_git_info()
      save_json(__A,  os.path.join(__A,  "git_log.json"							)							)




def        lowerCAmelCase_			(					__A,  __A,  __A=4,  **__A							)					->    List[str]:







      '''simple docstring'''


      with open(__A,  "w"							) as f:
            json.dump(__A,  __A,  indent=__A,  **__A							)




def        lowerCAmelCase_			(					__A							)					->    Optional[int]:







      '''simple docstring'''


      with open(__A							) as f:
            return json.load(__A							)




def        lowerCAmelCase_			(					)					->    List[Any]:







      '''simple docstring'''


      UpperCAmelCase__								=  git.Repo(search_parent_directories=__A							)
      UpperCAmelCase__								=  {
          "repo_id": str(__A							),
          "repo_sha": str(repo.head.object.hexsha							),
          "repo_branch": str(repo.active_branch							),
          "hostname": str(socket.gethostname()							),
      }
      return repo_infos




def        lowerCAmelCase_			(					__A,  __A							)					->    List:







      '''simple docstring'''


      return list(map(__A,  __A							)							)




def        lowerCAmelCase_			(					__A,  __A							)					->    List[Any]:







      '''simple docstring'''


      with open(__A,  "wb"							) as f:
            return pickle.dump(__A,  __A							)




def        lowerCAmelCase_			(					__A							)					->    Any:







      '''simple docstring'''


      def remove_articles(__A							):
            return re.sub(r"\b(a|an|the)\b",  " ",  __A							)

      def white_space_fix(__A							):
            return " ".join(text.split()							)

      def remove_punc(__A							):
            UpperCAmelCase__								=  set(string.punctuation							)
            return "".join(ch for ch in text if ch not in exclude							)

      def lower(__A							):
            return text.lower()

      return white_space_fix(remove_articles(remove_punc(lower(__A							)							)							)							)




def        lowerCAmelCase_			(					__A,  __A							)					->    Any:







      '''simple docstring'''


      UpperCAmelCase__								=  normalize_answer(__A							).split()
      UpperCAmelCase__								=  normalize_answer(__A							).split()
      UpperCAmelCase__								=  Counter(__A							) & Counter(__A							)
      UpperCAmelCase__								=  sum(common.values()							)
      if num_same == 0:
            return 0
      UpperCAmelCase__								=  1.0 * num_same / len(__A							)
      UpperCAmelCase__								=  1.0 * num_same / len(__A							)
      UpperCAmelCase__								=  (2 * precision * recall) / (precision + recall)
      return fa




def        lowerCAmelCase_			(					__A,  __A							)					->    Dict:







      '''simple docstring'''


      return normalize_answer(__A							) == normalize_answer(__A							)




def        lowerCAmelCase_			(					__A,  __A							)					->    Dict:







      '''simple docstring'''


      assert len(__A							) == len(__A							)
      UpperCAmelCase__								=  0
      for hypo, pred in zip(__A,  __A							):
            em += exact_match_score(__A,  __A							)
      if len(__A							) > 0:
            em /= len(__A							)
      return {"em": em}




def        lowerCAmelCase_			(					__A							)					->    int:







      '''simple docstring'''


      return model_prefix.startswith("rag"							)







def        lowerCAmelCase_			(					__A,  __A,  __A							)					->    Any:







      '''simple docstring'''


      UpperCAmelCase__								=  {p: p for p in extra_params}
      # T5 models don't have `dropout` param, they have `dropout_rate` instead
      UpperCAmelCase__								=  "dropout_rate"
      for p in extra_params:
            if getattr(__A,  __A,  __A							):
                  if not hasattr(__A,  __A							) and not hasattr(__A,  equivalent_param[p]							):
                        logger.info("config doesn't have a `{}` attribute".format(__A							)							)
                        delattr(__A,  __A							)
                        continue
                  UpperCAmelCase__								=  p if hasattr(__A,  __A							) else equivalent_param[p]
                  setattr(__A,  __A,  getattr(__A,  __A							)							)
                  delattr(__A,  __A							)
      return hparams, config




import unittest

from transformers import BigBirdTokenizer, BigBirdTokenizerFast
from transformers.testing_utils import get_tests_dir, require_sentencepiece, require_tokenizers, require_torch, slow
from transformers.utils import cached_property

from ...test_tokenization_common import TokenizerTesterMixin


UpperCamelCase__    							= '▁'

UpperCamelCase__    							= get_tests_dir('fixtures/test_sentencepiece.model')





@require_sentencepiece
@require_tokenizers
class 					A							(    UpperCAmelCase_		,    unittest.TestCase					):
   __UpperCAmelCase			:			int              =      BigBirdTokenizer
   __UpperCAmelCase			:			Optional[int]              =      BigBirdTokenizerFast
   __UpperCAmelCase			:			Union[str, Any]              =      True
   __UpperCAmelCase			:			List[Any]              =      True


   def       lowercase_				(self					:						Dict		)						->    List[str]:
         """simple docstring"""



         super().setUp()

         UpperCAmelCase__								=  self.tokenizer_class(__UpperCAmelCase	,  keep_accents=__UpperCAmelCase		)
         tokenizer.save_pretrained(self.tmpdirname		)


   def       lowercase_				(self					:						int		)						->    Union[str, Any]:
         """simple docstring"""



         UpperCAmelCase__								=  "<s>"
         UpperCAmelCase__								=  1

         self.assertEqual(self.get_tokenizer()._convert_token_to_id(__UpperCAmelCase		)	,  __UpperCAmelCase		)
         self.assertEqual(self.get_tokenizer()._convert_id_to_token(__UpperCAmelCase		)	,  __UpperCAmelCase		)


   def       lowercase_				(self					:						Any		)						->    Union[str, Any]:
         """simple docstring"""



         UpperCAmelCase__								=  list(self.get_tokenizer().get_vocab().keys()		)

         self.assertEqual(vocab_keys[0]	,  "<unk>"		)
         self.assertEqual(vocab_keys[1]	,  "<s>"		)
         self.assertEqual(vocab_keys[-1]	,  "[MASK]"		)
         self.assertEqual(len(__UpperCAmelCase		)	,  1_0_0_4		)


   def       lowercase_				(self					:						Optional[Any]		)						->    Optional[Any]:
         """simple docstring"""



         self.assertEqual(self.get_tokenizer().vocab_size	,  1_0_0_0		)


   def       lowercase_				(self					:						Union[str, Any]		)						->    Any:
         """simple docstring"""



         if not self.test_rust_tokenizer:
               return

         UpperCAmelCase__								=  self.get_tokenizer()
         UpperCAmelCase__								=  self.get_rust_tokenizer()

         UpperCAmelCase__								=  "I was born in 92000, and this is falsé."

         UpperCAmelCase__								=  tokenizer.tokenize(__UpperCAmelCase		)
         UpperCAmelCase__								=  rust_tokenizer.tokenize(__UpperCAmelCase		)
         self.assertListEqual(__UpperCAmelCase	,  __UpperCAmelCase		)

         UpperCAmelCase__								=  tokenizer.encode(__UpperCAmelCase	,  add_special_tokens=__UpperCAmelCase		)
         UpperCAmelCase__								=  rust_tokenizer.encode(__UpperCAmelCase	,  add_special_tokens=__UpperCAmelCase		)
         self.assertListEqual(__UpperCAmelCase	,  __UpperCAmelCase		)

         UpperCAmelCase__								=  self.get_rust_tokenizer()
         UpperCAmelCase__								=  tokenizer.encode(__UpperCAmelCase		)
         UpperCAmelCase__								=  rust_tokenizer.encode(__UpperCAmelCase		)
         self.assertListEqual(__UpperCAmelCase	,  __UpperCAmelCase		)


   def       lowercase_				(self					:						str		)						->    Tuple:
         """simple docstring"""



         UpperCAmelCase__								=  BigBirdTokenizer(__UpperCAmelCase	,  keep_accents=__UpperCAmelCase		)

         UpperCAmelCase__								=  tokenizer.tokenize("This is a test"		)
         self.assertListEqual(__UpperCAmelCase	,  ["▁This", "▁is", "▁a", "▁t", "est"]		)

         self.assertListEqual(
             tokenizer.convert_tokens_to_ids(__UpperCAmelCase		)	,  [2_8_5, 4_6, 1_0, 1_7_0, 3_8_2]	,  )

         UpperCAmelCase__								=  tokenizer.tokenize("I was born in 92000, and this is falsé."		)
         self.assertListEqual(
             __UpperCAmelCase	,  [
                 SPIECE_UNDERLINE + "I",
                 SPIECE_UNDERLINE + "was",
                 SPIECE_UNDERLINE + "b",
                 "or",
                 "n",
                 SPIECE_UNDERLINE + "in",
                 SPIECE_UNDERLINE + "",
                 "9",
                 "2",
                 "0",
                 "0",
                 "0",
                 ",",
                 SPIECE_UNDERLINE + "and",
                 SPIECE_UNDERLINE + "this",
                 SPIECE_UNDERLINE + "is",
                 SPIECE_UNDERLINE + "f",
                 "al",
                 "s",
                 "é",
                 ".",
             ]	,  )
         UpperCAmelCase__								=  tokenizer.convert_tokens_to_ids(__UpperCAmelCase		)
         self.assertListEqual(
             __UpperCAmelCase	,  [8, 2_1, 8_4, 5_5, 2_4, 1_9, 7, 0, 6_0_2, 3_4_7, 3_4_7, 3_4_7, 3, 1_2, 6_6, 4_6, 7_2, 8_0, 6, 0, 4]	,  )

         UpperCAmelCase__								=  tokenizer.convert_ids_to_tokens(__UpperCAmelCase		)
         self.assertListEqual(
             __UpperCAmelCase	,  [
                 SPIECE_UNDERLINE + "I",
                 SPIECE_UNDERLINE + "was",
                 SPIECE_UNDERLINE + "b",
                 "or",
                 "n",
                 SPIECE_UNDERLINE + "in",
                 SPIECE_UNDERLINE + "",
                 "<unk>",
                 "2",
                 "0",
                 "0",
                 "0",
                 ",",
                 SPIECE_UNDERLINE + "and",
                 SPIECE_UNDERLINE + "this",
                 SPIECE_UNDERLINE + "is",
                 SPIECE_UNDERLINE + "f",
                 "al",
                 "s",
                 "<unk>",
                 ".",
             ]	,  )


   @cached_property
   def       lowercase_				(self					:						Optional[int]		)						->    Union[str, Any]:
         """simple docstring"""



         return BigBirdTokenizer.from_pretrained("google/bigbird-roberta-base"		)


   @slow
   def       lowercase_				(self					:						str		)						->    Optional[int]:
         """simple docstring"""



         UpperCAmelCase__								=  "Hello World!"
         UpperCAmelCase__								=  [6_5, 1_8_5_3_6, 2_2_6_0, 1_0_1, 6_6]

         self.assertListEqual(__UpperCAmelCase	,  self.big_tokenizer.encode(__UpperCAmelCase		)		)


   @slow
   def       lowercase_				(self					:						List[Any]		)						->    Union[str, Any]:
         """simple docstring"""



         UpperCAmelCase__								=  (
             "This is a very long text with a lot of weird characters, such as: . , ~ ? ( ) \" [ ] ! : - . Also we will"
             " add words that should not exsist and be tokenized to <unk>, such as saoneuhaoesuth"
         )
         # fmt: off
         UpperCAmelCase__								=  [6_5, 8_7_1, 4_1_9, 3_5_8, 9_4_6, 9_9_1, 2_5_2_1, 4_5_2, 3_5_8, 1_3_5_7, 3_8_7, 7_7_5_1, 3_5_3_6, 1_1_2, 9_8_5, 4_5_6, 1_2_6, 8_6_5, 9_3_8, 5_4_0_0, 5_7_3_4, 4_5_8, 1_3_6_8, 4_6_7, 7_8_6, 2_4_6_2, 5_2_4_6, 1_1_5_9, 6_3_3, 8_6_5, 4_5_1_9, 4_5_7, 5_8_2, 8_5_2, 2_5_5_7, 4_2_7, 9_1_6, 5_0_8, 4_0_5, 3_4_3_2_4, 4_9_7, 3_9_1, 4_0_8, 1_1_3_4_2, 1_2_4_4, 3_8_5, 1_0_0, 9_3_8, 9_8_5, 4_5_6, 5_7_4, 3_6_2, 1_2_5_9_7, 3_2_0_0, 3_1_2_9, 1_1_7_2, 6_6]  # noqa: E231
         # fmt: on
         self.assertListEqual(__UpperCAmelCase	,  self.big_tokenizer.encode(__UpperCAmelCase		)		)


   @require_torch
   @slow
   def       lowercase_				(self					:						List[str]		)						->    int:
         """simple docstring"""



         import torch

         from transformers import BigBirdConfig, BigBirdModel

         # Build sequence
         UpperCAmelCase__								=  list(self.big_tokenizer.get_vocab().keys()		)[:1_0]
         UpperCAmelCase__								=  " ".join(__UpperCAmelCase		)
         UpperCAmelCase__								=  self.big_tokenizer.encode_plus(__UpperCAmelCase	,  return_tensors="pt"	,  return_token_type_ids=__UpperCAmelCase		)
         UpperCAmelCase__								=  self.big_tokenizer.batch_encode_plus(
             [sequence + " " + sequence]	,  return_tensors="pt"	,  return_token_type_ids=__UpperCAmelCase		)

         UpperCAmelCase__								=  BigBirdConfig(attention_type="original_full"		)
         UpperCAmelCase__								=  BigBirdModel(__UpperCAmelCase		)

         assert model.get_input_embeddings().weight.shape[0] >= self.big_tokenizer.vocab_size

         with torch.no_grad():
               model(**__UpperCAmelCase		)
               model(**__UpperCAmelCase		)


   @slow
   def       lowercase_				(self					:						str		)						->    Optional[int]:
         """simple docstring"""



         UpperCAmelCase__								=  BigBirdTokenizer.from_pretrained("google/bigbird-roberta-base"		)
         UpperCAmelCase__								=  tokenizer.decode(tokenizer("Paris is the [MASK]."		).input_ids		)

         self.assertTrue(decoded_text == "[CLS] Paris is the[MASK].[SEP]"		)





   @slow
   def       lowercase_				(self					:						Optional[Any]		)						->    Optional[int]:
         """simple docstring"""



         UpperCAmelCase__								=  {"input_ids": [[6_5, 3_9_2_8_6, 4_5_8, 3_6_3_3_5, 2_0_0_1, 4_5_6, 1_3_0_7_3, 1_3_2_6_6, 4_5_5, 1_1_3, 7_7_4_6, 1_7_4_1, 1_1_1_5_7, 3_9_1, 1_3_0_7_3, 1_3_2_6_6, 4_5_5, 1_1_3, 3_9_6_7, 3_5_4_1_2, 1_1_3, 4_9_3_6, 1_0_9, 3_8_7_0, 2_3_7_7, 1_1_3, 3_0_0_8_4, 4_5_7_2_0, 4_5_8, 1_3_4, 1_7_4_9_6, 1_1_2, 5_0_3, 1_1_6_7_2, 1_1_3, 1_1_8, 1_1_2, 5_6_6_5, 1_3_3_4_7, 3_8_6_8_7, 1_1_2, 1_4_9_6, 3_1_3_8_9, 1_1_2, 3_2_6_8, 4_7_2_6_4, 1_3_4, 9_6_2, 1_1_2, 1_6_3_7_7, 8_0_3_5, 2_3_1_3_0, 4_3_0, 1_2_1_6_9, 1_5_5_1_8, 2_8_5_9_2, 4_5_8, 1_4_6, 4_1_6_9_7, 1_0_9, 3_9_1, 1_2_1_6_9, 1_5_5_1_8, 1_6_6_8_9, 4_5_8, 1_4_6, 4_1_3_5_8, 1_0_9, 4_5_2, 7_2_6, 4_0_3_4, 1_1_1, 7_6_3, 3_5_4_1_2, 5_0_8_2, 3_8_8, 1_9_0_3, 1_1_1, 9_0_5_1, 3_9_1, 2_8_7_0, 4_8_9_1_8, 1_9_0_0, 1_1_2_3, 5_5_0, 9_9_8, 1_1_2, 9_5_8_6, 1_5_9_8_5, 4_5_5, 3_9_1, 4_1_0, 2_2_9_5_5, 3_7_6_3_6, 1_1_4, 6_6], [6_5, 4_4_8, 1_7_4_9_6, 4_1_9, 3_6_6_3, 3_8_5, 7_6_3, 1_1_3, 2_7_5_3_3, 2_8_7_0, 3_2_8_3, 1_3_0_4_3, 1_6_3_9, 2_4_7_1_3, 5_2_3, 6_5_6, 2_4_0_1_3, 1_8_5_5_0, 2_5_2_1, 5_1_7, 2_7_0_1_4, 2_1_2_4_4, 4_2_0, 1_2_1_2, 1_4_6_5, 3_9_1, 9_2_7, 4_8_3_3, 3_8_8, 5_7_8, 1_1_7_8_6, 1_1_4, 6_6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [6_5, 4_8_4, 2_1_6_9, 7_6_8_7, 2_1_9_3_2, 1_8_1_4_6, 7_2_6, 3_6_3, 1_7_0_3_2, 3_3_9_1, 1_1_4, 6_6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], "attention_mask": [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]}  # noqa: E501
         # fmt: on

         self.tokenizer_integration_test_util(
             expected_encoding=__UpperCAmelCase	,  model_name="google/bigbird-roberta-base"	,  revision="215c99f1600e06f83acce68422f2035b2b5c3510"	,  )



