

import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from .tokenization_lxmert import LxmertTokenizer


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

lowerCAmelCase_       	=	{
    '''vocab_file''': {
        '''unc-nlp/lxmert-base-uncased''': '''https://huggingface.co/unc-nlp/lxmert-base-uncased/resolve/main/vocab.txt''',
    },
    '''tokenizer_file''': {
        '''unc-nlp/lxmert-base-uncased''': (
            '''https://huggingface.co/unc-nlp/lxmert-base-uncased/resolve/main/tokenizer.json'''
        ),
    },
}

lowerCAmelCase_       	=	{
    '''unc-nlp/lxmert-base-uncased''': 5_12,
}

lowerCAmelCase_       	=	{
    '''unc-nlp/lxmert-base-uncased''': {'''do_lower_case''': True},
}





class 	snake_case_   (		__A					):







			'''simple docstring'''

			SCREAMING_SNAKE_CASE     :   Optional[Any]									=				VOCAB_FILES_NAMES
			SCREAMING_SNAKE_CASE     :   Any									=				PRETRAINED_VOCAB_FILES_MAP
			SCREAMING_SNAKE_CASE     :   List[Any]									=				PRETRAINED_INIT_CONFIGURATION
			SCREAMING_SNAKE_CASE     :   Optional[int]									=				PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
			SCREAMING_SNAKE_CASE     :   Any									=				LxmertTokenizer







			def __init__(     self :				Union[str, Any]							,   _UpperCamelCase :				int=None							,   _UpperCamelCase :				Optional[Any]=None							,   _UpperCamelCase :				Dict=True							,   _UpperCamelCase :				Any="[UNK]"							,   _UpperCamelCase :				Tuple="[SEP]"							,   _UpperCamelCase :				List[Any]="[PAD]"							,   _UpperCamelCase :				Union[str, Any]="[CLS]"							,   _UpperCamelCase :				str="[MASK]"							,   _UpperCamelCase :				List[str]=True							,   _UpperCamelCase :				List[str]=None							,   **_UpperCamelCase :				List[str]							,   )      ->Any:
									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							,   )

									snake_case_   =	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
									):
															snake_case_   =	getattr(_UpperCamelCase							,   normalizer_state.pop('''type'''							)							)
															snake_case_   =	do_lower_case
															snake_case_   =	strip_accents
															snake_case_   =	tokenize_chinese_chars
															snake_case_   =	normalizer_class(**_UpperCamelCase							)

									snake_case_   =	do_lower_case







			def 				snake_case__(     self :				Optional[int]							,   _UpperCamelCase :				List[Any]							,   _UpperCamelCase :				List[str]=None							)      ->List[Any]:
									snake_case_   =	[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 :				int							,   _UpperCamelCase :				List[int]							,   _UpperCamelCase :				Optional[List[int]] = None							)      ->List[int]:
									snake_case_   =	[self.sep_token_id]
									snake_case_   =	[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 :				Any							,   _UpperCamelCase :				str							,   _UpperCamelCase :				Optional[str] = None							)      ->Tuple[str]:
									snake_case_   =	self._tokenizer.model.save(_UpperCamelCase							,   name=_UpperCamelCase							)
									return tuple(_UpperCamelCase							)


from __future__ import annotations

from collections.abc import Generator


def   __SCREAMING_SNAKE_CASE					():
						snake_case_   =	{}
						snake_case_   =	2
						while True:
												snake_case_   =	factor_map.pop(SCREAMING_SNAKE_CASE__  ,		SCREAMING_SNAKE_CASE__       )
												if factor:
																		snake_case_   =	factor + prime
																		while x in factor_map:
																								x += factor
																		snake_case_   =	factor
												else:
																		snake_case_   =	prime
																		yield prime
												prime += 1


def   __SCREAMING_SNAKE_CASE					(SCREAMING_SNAKE_CASE__ = 1E10       ):
						snake_case_   =	sieve()

						snake_case_   =	1
						while True:
												snake_case_   =	next(SCREAMING_SNAKE_CASE__       )
												if (2 * prime * n) > limit:
																		return n
												# Ignore the next prime as the reminder will be 2.
												next(SCREAMING_SNAKE_CASE__       )
												n += 2


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