
'''simple docstring'''



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


_lowercase          =						logging.get_logger(__name__)

_lowercase          =						{"""vocab_file""": """vocab.txt""", """tokenizer_file""": """tokenizer.json"""}

_lowercase          =						[
    """small""",
    """small-base""",
    """medium""",
    """medium-base""",
    """intermediate""",
    """intermediate-base""",
    """large""",
    """large-base""",
    """xlarge""",
    """xlarge-base""",
]

_lowercase          =						{
    """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"""
        ),
    },
}
_lowercase          =						{F"""funnel-transformer/{name}""": 512 for name in _model_names}
_lowercase          =						{F"""funnel-transformer/{name}""": {"""do_lower_case""": True} for name in _model_names}




class     UpperCAmelCase_	(						_SCREAMING_SNAKE_CASE					):






						'''simple docstring'''






						_lowercase						: str										=  VOCAB_FILES_NAMES
						_lowercase						: Tuple										=  PRETRAINED_VOCAB_FILES_MAP
						_lowercase						: Any										=  PRETRAINED_INIT_CONFIGURATION
						_lowercase						: List[str]										=  FunnelTokenizer
						_lowercase						: Any										=  PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
						_lowercase						: int										=  2




						def __init__(   self       ,  _lowercase=None       ,  _lowercase=None       ,  _lowercase=True       ,  _lowercase="<unk>"       ,  _lowercase="<sep>"       ,  _lowercase="<pad>"       ,  _lowercase="<cls>"       ,  _lowercase="<mask>"       ,  _lowercase="<s>"       ,  _lowercase="</s>"       ,  _lowercase=True       ,  _lowercase=True       ,  _lowercase=None       ,  _lowercase="##"       ,  **_lowercase       ,  ):

												"""simple docstring"""



												super().__init__(
												    _lowercase       ,  tokenizer_file=_lowercase       ,  do_lower_case=_lowercase       ,  unk_token=_lowercase       ,  sep_token=_lowercase       ,  pad_token=_lowercase       ,  cls_token=_lowercase       ,  mask_token=_lowercase       ,  bos_token=_lowercase       ,  eos_token=_lowercase       ,  clean_text=_lowercase       ,  tokenize_chinese_chars=_lowercase       ,  strip_accents=_lowercase       ,  wordpieces_prefix=_lowercase       ,  **_lowercase       ,  )

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

												_lowerCAmelCase    		=					do_lower_case




						def    _lowercase      (   self       ,  _lowercase       ,  _lowercase=None ):

												"""simple docstring"""



												_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    _lowercase      (   self       ,  _lowercase       ,  _lowercase = None ):

												"""simple docstring"""



												_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    _lowercase      (   self       ,  _lowercase       ,  _lowercase = None ):

												"""simple docstring"""



												_lowerCAmelCase    		=					self._tokenizer.model.save(_lowercase       ,  name=_lowercase )
												return tuple(_lowercase )


'''simple docstring'''



def A ():
						for n in range(1					,      1000000						):
												yield n * (n + 1) // 2


def A (__lowerCamelCase :List[Any]						):
						_lowerCAmelCase    		=					1
						_lowerCAmelCase    		=					2
						while i * i <= n:
												_lowerCAmelCase    		=					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 A ():
						return next(i for i in triangle_number_generator() if count_divisors(__lowerCamelCase						) > 500						)


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