





def        _lowercase   (  _UpperCAmelCase			)  ->					int:
				assert (
				    isinstance(_UpperCAmelCase     , _UpperCAmelCase			) and number_of_steps > 0
				), F"""number_of_steps needs to be positive integer, your input {number_of_steps}"""
				if number_of_steps == 1:
								return 1
				lowerCamelCase	,					lowerCamelCase			=1, 1
				for _ in range(number_of_steps - 1			):
								lowerCamelCase	,					lowerCamelCase			=current + previous, current
				return current


if __name__ == "__main__":
							import doctest

							doctest.testmod()







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


UpperCAmelCase__  :     Optional[int]   			=logging.get_logger(__name__)

UpperCAmelCase__  :     int   			={'''vocab_file''': '''vocab.txt''', '''tokenizer_file''': '''tokenizer.json'''}

UpperCAmelCase__  :     List[str]   			={
    '''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'''
    },
}

UpperCAmelCase__  :     Any   			={'''mobilebert-uncased''': 5_12}


UpperCAmelCase__  :     Any   			={}

class  __A       (  a      ):
				__A								=			VOCAB_FILES_NAMES
				__A								=			PRETRAINED_VOCAB_FILES_MAP
				__A								=			PRETRAINED_INIT_CONFIGURATION
				__A								=			PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
				__A								=			MobileBertTokenizer


				def __init__(						self				,	UpperCAmelCase_=None				,	UpperCAmelCase_=None				,	UpperCAmelCase_=True				,	UpperCAmelCase_="[UNK]"				,	UpperCAmelCase_="[SEP]"				,	UpperCAmelCase_="[PAD]"				,	UpperCAmelCase_="[CLS]"				,	UpperCAmelCase_="[MASK]"				,	UpperCAmelCase_=True				,	UpperCAmelCase_=None				,	**UpperCAmelCase_				,	):
								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			=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			=getattr(UpperCAmelCase_				,	normalizer_state.pop("""type"""							)							)
												lowerCamelCase			=do_lower_case
												lowerCamelCase			=strip_accents
												lowerCamelCase			=tokenize_chinese_chars
												lowerCamelCase			=normalizer_class(**UpperCAmelCase_							)

								lowerCamelCase			=do_lower_case


				def _snake_case    (						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 _snake_case    (						self				,	UpperCAmelCase_				,	UpperCAmelCase_ = None							):
								lowerCamelCase			=[self.sep_token_id]
								lowerCamelCase			=[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 _snake_case    (						self				,	UpperCAmelCase_				,	UpperCAmelCase_ = None							):
								lowerCamelCase			=self._tokenizer.model.save(UpperCAmelCase_				,	name=UpperCAmelCase_							)
								return tuple(UpperCAmelCase_							)





