
"""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_mobilebert import MobileBertTokenizer


lowerCamelCase__        =		logging.get_logger(__name__)

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

lowerCamelCase__        =		{
    """vocab_file""": {"""mobilebert-uncased""": """https://huggingface.co/google/mobilebert-uncased/resolve/main/vocab.txt"""},
    """tokenizer_file""": {
        """mobilebert-uncased""": """https://huggingface.co/google/mobilebert-uncased/resolve/main/tokenizer.json"""
    },
}

lowerCamelCase__        =		{"""mobilebert-uncased""": 512}


lowerCamelCase__        =		{}




class 			A__	(     _UpperCAmelCase):
		A_						:	Any           =     VOCAB_FILES_NAMES
		A_						:	int           =     PRETRAINED_VOCAB_FILES_MAP
		A_						:	Dict           =     PRETRAINED_INIT_CONFIGURATION
		A_						:	Tuple           =     PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
		A_						:	Dict           =     MobileBertTokenizer

		def __init__(				self	,		_SCREAMING_SNAKE_CASE=None	,		_SCREAMING_SNAKE_CASE=None	,		_SCREAMING_SNAKE_CASE=True	,		_SCREAMING_SNAKE_CASE="[UNK]"	,		_SCREAMING_SNAKE_CASE="[SEP]"	,		_SCREAMING_SNAKE_CASE="[PAD]"	,		_SCREAMING_SNAKE_CASE="[CLS]"	,		_SCREAMING_SNAKE_CASE="[MASK]"	,		_SCREAMING_SNAKE_CASE=True	,		_SCREAMING_SNAKE_CASE=None	,		**_SCREAMING_SNAKE_CASE	,		):
			super().__init__(
			    _UpperCAmelCase	,		tokenizer_file=_UpperCAmelCase	,		do_lower_case=_UpperCAmelCase	,		unk_token=_UpperCAmelCase	,		sep_token=_UpperCAmelCase	,		pad_token=_UpperCAmelCase	,		cls_token=_UpperCAmelCase	,		mask_token=_UpperCAmelCase	,		tokenize_chinese_chars=_UpperCAmelCase	,		strip_accents=_UpperCAmelCase	,		**_UpperCAmelCase	,		)

			__lowerCAmelCase      :						Optional[Any]						      =				json.loads(self.backend_tokenizer.normalizer.__getstate__()			)
			if (
			    normalizer_state.get('lowercase'	,		_UpperCAmelCase			) != do_lower_case
			    or normalizer_state.get('strip_accents'	,		_UpperCAmelCase			) != strip_accents
			    or normalizer_state.get('handle_chinese_chars'	,		_UpperCAmelCase			) != tokenize_chinese_chars
			):
				__lowerCAmelCase      :						Optional[Any]						      =				getattr(_UpperCAmelCase	,		normalizer_state.pop('type'			)			)
				__lowerCAmelCase      :						Any						      =				do_lower_case
				__lowerCAmelCase      :						List[Any]						      =				strip_accents
				__lowerCAmelCase      :						List[Any]						      =				tokenize_chinese_chars
				__lowerCAmelCase      :						Tuple						      =				normalizer_class(**_UpperCAmelCase			)

			__lowerCAmelCase      :						Dict						      =				do_lower_case

		def 							__lowerCamelCase							(				self	,		_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE=None			):
			__lowerCAmelCase      :						Any						      =				[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	,		_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE = None			):
			__lowerCAmelCase      :						Union[str, Any]						      =				[self.sep_token_id]
			__lowerCAmelCase      :						Optional[int]						      =				[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 							__lowerCamelCase							(				self	,		_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE = None			):
			__lowerCAmelCase      :						Optional[Any]						      =				self._tokenizer.model.save(_UpperCAmelCase	,		name=_UpperCAmelCase			)
			return tuple(_UpperCAmelCase			)

"""simple docstring"""







from __future__ import annotations
def    __lowerCAmelCase    (_UpperCamelCase		):
	__lowerCAmelCase      :						List[str]						      =				str(_UpperCamelCase		)
	return len(_UpperCamelCase		) == 9 and set(_UpperCamelCase		) == set('123456789'		)
def    __lowerCAmelCase    ():
	for base_num in range(9999	,  4999	,  -1		):
		__lowerCAmelCase      :						Union[str, Any]						      =				10_0002 * base_num
		if is_9_pandigital(_UpperCamelCase		):
			return candidate

	for base_num in range(333	,  99	,  -1		):
		__lowerCAmelCase      :						Dict						      =				100_2003 * base_num
		if is_9_pandigital(_UpperCamelCase		):
			return candidate

	return None


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