





from typing import List, Optional, Tuple

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_herbert import HerbertTokenizer


UpperCAmelCase_     							= logging.get_logger(__name__)

UpperCAmelCase_     							= {'vocab_file': 'vocab.json', 'merges_file': 'merges.txt', 'tokenizer_file': 'tokenizer.json'}

UpperCAmelCase_     							= {
    'vocab_file': {
        'allegro/herbert-base-cased': 'https://huggingface.co/allegro/herbert-base-cased/resolve/main/vocab.json'
    },
    'merges_file': {
        'allegro/herbert-base-cased': 'https://huggingface.co/allegro/herbert-base-cased/resolve/main/merges.txt'
    },
}

UpperCAmelCase_     							= {'allegro/herbert-base-cased': 514}
UpperCAmelCase_     							= {}






class     lowercase__       (	__lowerCamelCase				):

   '''simple docstring'''


   a						:							Any   		=		VOCAB_FILES_NAMES
   a						:							int   		=		PRETRAINED_VOCAB_FILES_MAP
   a						:							Tuple   		=		PRETRAINED_INIT_CONFIGURATION
   a						:							Dict   		=		PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
   a						:							Any   		=		HerbertTokenizer




   def __init__(    self,		__magic_name__=None,		__magic_name__=None,		__magic_name__=None,		__magic_name__="<s>",		__magic_name__="<unk>",		__magic_name__="<pad>",		__magic_name__="<mask>",		__magic_name__="</s>",		**__magic_name__,		) ->      List[str]:






       """simple docstring"""
       super().__init__(
           __magic_name__,		__magic_name__,		tokenizer_file=__magic_name__,		cls_token=__magic_name__,		unk_token=__magic_name__,		pad_token=__magic_name__,		mask_token=__magic_name__,		sep_token=__magic_name__,		**__magic_name__,		)




   def       UpperCamelCase__  (    self,		__magic_name__,		__magic_name__ = None							) ->      List[int]:






       """simple docstring"""
       UpperCamelCase__							:				List[str]          =      [self.cls_token_id]
       UpperCamelCase__							:				str          =      [self.sep_token_id]
       if token_ids_a is None:
           return cls + token_ids_a + sep

       return cls + token_ids_a + sep + token_ids_a + sep




   def       UpperCamelCase__  (    self,		__magic_name__,		__magic_name__ = None,		__magic_name__ = False							) ->      List[int]:






       """simple docstring"""
       if already_has_special_tokens:
           return super().get_special_tokens_mask(
               token_ids_a=__magic_name__,		token_ids_a=__magic_name__,		already_has_special_tokens=__magic_name__							)

       if token_ids_a is None:
           return [1] + ([0] * len(__magic_name__							)) + [1]
       return [1] + ([0] * len(__magic_name__							)) + [1] + ([0] * len(__magic_name__							)) + [1]




   def       UpperCamelCase__  (    self,		__magic_name__,		__magic_name__ = None							) ->      List[int]:






       """simple docstring"""
       UpperCamelCase__							:				int          =      [self.sep_token_id]
       UpperCamelCase__							:				Optional[Any]          =      [self.cls_token_id]

       if token_ids_a is None:
           return len(cls + token_ids_a + sep							) * [0]
       return len(cls + token_ids_a + sep							) * [0] + len(token_ids_a + sep							) * [1]




   def       UpperCamelCase__  (    self,		__magic_name__,		__magic_name__ = None							) ->      Tuple[str]:






       """simple docstring"""
       UpperCamelCase__							:				Optional[int]          =      self._tokenizer.model.save(__magic_name__,		name=__magic_name__							)
       return tuple(__magic_name__							)








def 		lowerCAmelCase_    (  __UpperCAmelCase:			int      )      ->	bool:
    return str(__UpperCAmelCase      ) == str(__UpperCAmelCase      )[::-1]




def 		lowerCAmelCase_    (  __UpperCAmelCase:			int      )      ->	int:
    return int(__UpperCAmelCase      ) + int(str(__UpperCAmelCase      )[::-1]      )




def 		lowerCAmelCase_    (  __UpperCAmelCase:			int = 1_0000      )      ->	int:
    UpperCamelCase__							:				Optional[Any]          =      []
    for num in range(1		,   __UpperCAmelCase      ):
        UpperCamelCase__							:				str          =      0
        UpperCamelCase__							:				Any          =      num
        while iterations < 50:
            UpperCamelCase__							:				List[Any]          =      sum_reverse(__UpperCAmelCase      )
            iterations += 1
            if is_palindrome(__UpperCAmelCase      ):
                break
        else:
            lychrel_nums.append(__UpperCAmelCase      )
    return len(__UpperCAmelCase      )


if __name__ == "__main__":
  print(F'''{solution() = }''')

