





import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_funnel import FunnelTokenizer


_a				:	Union[str, Any]           =       logging.get_logger(__name__)

_a				:	Union[str, Any]           =       {'vocab_file': 'vocab.txt', 'tokenizer_file': 'tokenizer.json'}

_a				:	Optional[Any]           =       [
    'small',
    'small-base',
    'medium',
    'medium-base',
    'intermediate',
    'intermediate-base',
    'large',
    'large-base',
    'xlarge',
    'xlarge-base',
]

_a				:	Dict           =       {
    'vocab_file': {
        'funnel-transformer/small': 'https://huggingface.co/funnel-transformer/small/resolve/main/vocab.txt',
        'funnel-transformer/small-base': 'https://huggingface.co/funnel-transformer/small-base/resolve/main/vocab.txt',
        'funnel-transformer/medium': 'https://huggingface.co/funnel-transformer/medium/resolve/main/vocab.txt',
        'funnel-transformer/medium-base': (
            'https://huggingface.co/funnel-transformer/medium-base/resolve/main/vocab.txt'
        ),
        'funnel-transformer/intermediate': (
            'https://huggingface.co/funnel-transformer/intermediate/resolve/main/vocab.txt'
        ),
        'funnel-transformer/intermediate-base': (
            'https://huggingface.co/funnel-transformer/intermediate-base/resolve/main/vocab.txt'
        ),
        'funnel-transformer/large': 'https://huggingface.co/funnel-transformer/large/resolve/main/vocab.txt',
        'funnel-transformer/large-base': 'https://huggingface.co/funnel-transformer/large-base/resolve/main/vocab.txt',
        'funnel-transformer/xlarge': 'https://huggingface.co/funnel-transformer/xlarge/resolve/main/vocab.txt',
        'funnel-transformer/xlarge-base': (
            'https://huggingface.co/funnel-transformer/xlarge-base/resolve/main/vocab.txt'
        ),
    },
    'tokenizer_file': {
        'funnel-transformer/small': 'https://huggingface.co/funnel-transformer/small/resolve/main/tokenizer.json',
        'funnel-transformer/small-base': (
            'https://huggingface.co/funnel-transformer/small-base/resolve/main/tokenizer.json'
        ),
        'funnel-transformer/medium': 'https://huggingface.co/funnel-transformer/medium/resolve/main/tokenizer.json',
        'funnel-transformer/medium-base': (
            'https://huggingface.co/funnel-transformer/medium-base/resolve/main/tokenizer.json'
        ),
        'funnel-transformer/intermediate': (
            'https://huggingface.co/funnel-transformer/intermediate/resolve/main/tokenizer.json'
        ),
        'funnel-transformer/intermediate-base': (
            'https://huggingface.co/funnel-transformer/intermediate-base/resolve/main/tokenizer.json'
        ),
        'funnel-transformer/large': 'https://huggingface.co/funnel-transformer/large/resolve/main/tokenizer.json',
        'funnel-transformer/large-base': (
            'https://huggingface.co/funnel-transformer/large-base/resolve/main/tokenizer.json'
        ),
        'funnel-transformer/xlarge': 'https://huggingface.co/funnel-transformer/xlarge/resolve/main/tokenizer.json',
        'funnel-transformer/xlarge-base': (
            'https://huggingface.co/funnel-transformer/xlarge-base/resolve/main/tokenizer.json'
        ),
    },
}
_a				:	List[str]           =       {F"""funnel-transformer/{name}""": 5_12 for name in _model_names}
_a				:	Optional[int]           =       {F"""funnel-transformer/{name}""": {'do_lower_case': True} for name in _model_names}




class 							UpperCamelCase_							(       _a		):







 """simple docstring"""

 A			 =       VOCAB_FILES_NAMES
 A			 =       PRETRAINED_VOCAB_FILES_MAP
 A			 =       PRETRAINED_INIT_CONFIGURATION
 A			 =       FunnelTokenizer
 A			 =       PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
 A			 =       2


 def __init__(   self  ,				UpperCAmelCase=None  ,				UpperCAmelCase=None  ,				UpperCAmelCase=True  ,				UpperCAmelCase="<unk>"  ,				UpperCAmelCase="<sep>"  ,				UpperCAmelCase="<pad>"  ,				UpperCAmelCase="<cls>"  ,				UpperCAmelCase="<mask>"  ,				UpperCAmelCase="<s>"  ,				UpperCAmelCase="</s>"  ,				UpperCAmelCase=True  ,				UpperCAmelCase=True  ,				UpperCAmelCase=None  ,				UpperCAmelCase="##"  ,				**UpperCAmelCase  ,				):
       super().__init__(
           snake_case_  ,				tokenizer_file=snake_case_  ,				do_lower_case=snake_case_  ,				unk_token=snake_case_  ,				sep_token=snake_case_  ,				pad_token=snake_case_  ,				cls_token=snake_case_  ,				mask_token=snake_case_  ,				bos_token=snake_case_  ,				eos_token=snake_case_  ,				clean_text=snake_case_  ,				tokenize_chinese_chars=snake_case_  ,				strip_accents=snake_case_  ,				wordpieces_prefix=snake_case_  ,				**snake_case_  ,				)

       __lowerCamelCase				   =       json.loads(self.backend_tokenizer.normalizer.__getstate__()							)
       if (
           normalizer_state.get("""lowercase"""  ,				snake_case_							) != do_lower_case
           or normalizer_state.get("""strip_accents"""  ,				snake_case_							) != strip_accents
           or normalizer_state.get("""handle_chinese_chars"""  ,				snake_case_							) != tokenize_chinese_chars
       ):
             __lowerCamelCase				   =       getattr(snake_case_  ,				normalizer_state.pop("""type"""							)							)
             __lowerCamelCase				   =       do_lower_case
             __lowerCamelCase				   =       strip_accents
             __lowerCamelCase				   =       tokenize_chinese_chars
             __lowerCamelCase				   =       normalizer_class(**snake_case_							)

       __lowerCamelCase				   =       do_lower_case


 def 		lowerCamelCase_ (   self  ,				UpperCAmelCase  ,				UpperCAmelCase=None							):
       __lowerCamelCase				   =       [self.cls_token_id] + token_ids_a + [self.sep_token_id]

       if token_ids_a:
             output += token_ids_a + [self.sep_token_id]

       return output


 def 		lowerCamelCase_ (   self  ,				UpperCAmelCase  ,				UpperCAmelCase = None							):
       __lowerCamelCase				   =       [self.sep_token_id]
       __lowerCamelCase				   =       [self.cls_token_id]
       if token_ids_a is None:
             return len(cls							) * [self.cls_token_type_id] + len(token_ids_a + sep							) * [0]
       return len(cls							) * [self.cls_token_type_id] + len(token_ids_a + sep							) * [0] + len(token_ids_a + sep							) * [1]



 def 		lowerCamelCase_ (   self  ,				UpperCAmelCase  ,				UpperCAmelCase = None							):
       __lowerCamelCase				   =       self._tokenizer.model.save(snake_case_  ,				name=snake_case_							)
       return tuple(snake_case_							)











'''simple docstring'''





def 		__snake_case(							)						->					Optional[Any]:
      for n in range(1	,  1_000_000						):
            yield n * (n + 1) // 2





def 		__snake_case(							_lowerCAmelCase						)						->					str:
      snake_case__    :       Optional[int]       		= 1
      snake_case__    :       List[Any]       		= 2
      while i * i <= n:
            snake_case__    :       Dict       		= 0
            while n % i == 0:
                  n //= i
                  multiplicity += 1
            divisors_count *= multiplicity + 1
            i += 1
      if n > 1:
            divisors_count *= 2
      return divisors_count





def 		__snake_case(							)						->					List[str]:
      return next(i for i in triangle_number_generator() if count_divisors(_lowerCAmelCase						) > 500						)


if __name__ == "__main__":
       print(solution())
