






"""simple docstring"""




import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils import AddedToken
from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_mpnet import MPNetTokenizer


UpperCamelCase											=     logging.get_logger(__name__)

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

UpperCamelCase											=     {
    """vocab_file""": {
        """microsoft/mpnet-base""": """https://huggingface.co/microsoft/mpnet-base/resolve/main/vocab.txt""",
    },
    """tokenizer_file""": {
        """microsoft/mpnet-base""": """https://huggingface.co/microsoft/mpnet-base/resolve/main/tokenizer.json""",
    },
}

UpperCamelCase											=     {
    """microsoft/mpnet-base""": 512,
}

UpperCamelCase											=     {
    """microsoft/mpnet-base""": {"""do_lower_case""": True},
}




class  lowercase_     (SCREAMING_SNAKE_CASE__  ):
      A__						:		List[Any]							      =					VOCAB_FILES_NAMES
      A__						:		List[Any]							      =					PRETRAINED_VOCAB_FILES_MAP
      A__						:		Dict							      =					PRETRAINED_INIT_CONFIGURATION
      A__						:		Union[str, Any]							      =					PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
      A__						:		Union[str, Any]							      =					MPNetTokenizer
      A__						:		Tuple							      =					['''input_ids''', '''attention_mask''']






      def __init__(     self  ,  a_=None  ,  a_=None  ,  a_=True  ,  a_="<s>"  ,  a_="</s>"  ,  a_="</s>"  ,  a_="<s>"  ,  a_="[UNK]"  ,  a_="<pad>"  ,  a_="<mask>"  ,  a_=True  ,  a_=None  ,  **a_  ,  )						->Tuple:







        '''simple docstring'''


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

        _a					      =						json.loads(self.backend_tokenizer.normalizer.__getstate__()						)
        if (
            pre_tok_state.get("lowercase"  ,  _UpperCAmelCase						) != do_lower_case
            or pre_tok_state.get("strip_accents"  ,  _UpperCAmelCase						) != strip_accents
        ):
          _a					      =						getattr(_UpperCAmelCase  ,  pre_tok_state.pop("type"						)						)
          _a					      =						do_lower_case
          _a					      =						strip_accents
          _a					      =						pre_tok_class(**_UpperCAmelCase						)

        _a					      =						do_lower_case






      @property
      def       lowerCamelCase__     (     self						)						->str:







        '''simple docstring'''


        if self._mask_token is None:
          if self.verbose:
            logger.error("Using mask_token, but it is not set yet."						)
          return None
        return str(self._mask_token						)






      @mask_token.setter
      def       lowerCamelCase__     (     self  ,  a_						)						->List[str]:







        '''simple docstring'''


        _a					      =						AddedToken(_UpperCAmelCase  ,  lstrip=_UpperCAmelCase  ,  rstrip=_UpperCAmelCase						) if isinstance(_UpperCAmelCase  ,  _UpperCAmelCase						) else value
        _a					      =						value






      def       lowerCamelCase__     (     self  ,  a_  ,  a_=None						)						->Optional[int]:







        '''simple docstring'''


        _a					      =						[self.bos_token_id] + token_ids_a + [self.eos_token_id]
        if token_ids_a is None:
          return output

        return output + [self.eos_token_id] + token_ids_a + [self.eos_token_id]






      def       lowerCamelCase__     (     self  ,  a_  ,  a_ = None						)						->List[int]:







        '''simple docstring'''


        _a					      =						[self.sep_token_id]
        _a					      =						[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 + sep + token_ids_a + sep						) * [0]






      def       lowerCamelCase__     (     self  ,  a_  ,  a_ = None						)						->Tuple[str]:







        '''simple docstring'''


        _a					      =						self._tokenizer.model.save(_UpperCAmelCase  ,  name=_UpperCAmelCase						)
        return tuple(_UpperCAmelCase						)








'''simple docstring'''






import itertools

def      __lowerCAmelCase   (       snake_case__		):
			return (
			    int("".join(combination[0:2]		)		) * int("".join(combination[2:5]		)		)
			    == int("".join(combination[5:9]		)		)
			) or (
			    int("".join(combination[0]		)		) * int("".join(combination[1:5]		)		)
			    == int("".join(combination[5:9]		)		)
			)

def      __lowerCAmelCase   (       ):
			return sum(
			    {
			        int("".join(pandigital[5:9]		)		)
			        for pandigital in itertools.permutations("123456789"		)
			        if is_combination_valid(snake_case__		)
			    }		)


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



