

"""simple docstring"""






import os
from shutil import copyfile
from typing import List, Optional, Tuple

from ...tokenization_utils import AddedToken
from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import is_sentencepiece_available, logging


if is_sentencepiece_available():
						from .tokenization_albert import AlbertTokenizer
else:
						lowerCamelCase__					:	Tuple				    =	None

lowerCamelCase__					:	Any				    =	logging.get_logger(__name__)
lowerCamelCase__					:	str				    =	{'''vocab_file''': '''spiece.model''', '''tokenizer_file''': '''tokenizer.json'''}

lowerCamelCase__					:	Union[str, Any]				    =	{
    '''vocab_file''': {
        '''albert-base-v1''': '''https://huggingface.co/albert-base-v1/resolve/main/spiece.model''',
        '''albert-large-v1''': '''https://huggingface.co/albert-large-v1/resolve/main/spiece.model''',
        '''albert-xlarge-v1''': '''https://huggingface.co/albert-xlarge-v1/resolve/main/spiece.model''',
        '''albert-xxlarge-v1''': '''https://huggingface.co/albert-xxlarge-v1/resolve/main/spiece.model''',
        '''albert-base-v2''': '''https://huggingface.co/albert-base-v2/resolve/main/spiece.model''',
        '''albert-large-v2''': '''https://huggingface.co/albert-large-v2/resolve/main/spiece.model''',
        '''albert-xlarge-v2''': '''https://huggingface.co/albert-xlarge-v2/resolve/main/spiece.model''',
        '''albert-xxlarge-v2''': '''https://huggingface.co/albert-xxlarge-v2/resolve/main/spiece.model''',
    },
    '''tokenizer_file''': {
        '''albert-base-v1''': '''https://huggingface.co/albert-base-v1/resolve/main/tokenizer.json''',
        '''albert-large-v1''': '''https://huggingface.co/albert-large-v1/resolve/main/tokenizer.json''',
        '''albert-xlarge-v1''': '''https://huggingface.co/albert-xlarge-v1/resolve/main/tokenizer.json''',
        '''albert-xxlarge-v1''': '''https://huggingface.co/albert-xxlarge-v1/resolve/main/tokenizer.json''',
        '''albert-base-v2''': '''https://huggingface.co/albert-base-v2/resolve/main/tokenizer.json''',
        '''albert-large-v2''': '''https://huggingface.co/albert-large-v2/resolve/main/tokenizer.json''',
        '''albert-xlarge-v2''': '''https://huggingface.co/albert-xlarge-v2/resolve/main/tokenizer.json''',
        '''albert-xxlarge-v2''': '''https://huggingface.co/albert-xxlarge-v2/resolve/main/tokenizer.json''',
    },
}

lowerCamelCase__					:	Any				    =	{
    '''albert-base-v1''': 5_12,
    '''albert-large-v1''': 5_12,
    '''albert-xlarge-v1''': 5_12,
    '''albert-xxlarge-v1''': 5_12,
    '''albert-base-v2''': 5_12,
    '''albert-large-v2''': 5_12,
    '''albert-xlarge-v2''': 5_12,
    '''albert-xxlarge-v2''': 5_12,
}

lowerCamelCase__					:	List[Any]				    =	'''▁'''






class      _UpperCAmelCase      (		__UpperCAmelCase):
			__a			:							str					       =				VOCAB_FILES_NAMES
			__a			:							Any					       =				PRETRAINED_VOCAB_FILES_MAP
			__a			:							str					       =				PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
			__a			:							Optional[int]					       =				AlbertTokenizer
			def __init__(		self   ,		_A=None   ,		_A=None   ,		_A=True   ,		_A=True   ,		_A=False   ,		_A="[CLS]"   ,		_A="[SEP]"   ,		_A="<unk>"   ,		_A="[SEP]"   ,		_A="<pad>"   ,		_A="[CLS]"   ,		_A="[MASK]"   ,		**_A   ,		)     ->     Optional[Any]:






				'''simple docstring'''







				_UpperCAmelCase     :				List[Any]          =       (
				    AddedToken(lowerCamelCase__   ,		lstrip=lowerCamelCase__   ,		rstrip=lowerCamelCase__   ,		normalized=lowerCamelCase__  )
				    if isinstance(lowerCamelCase__   ,		lowerCamelCase__  )
				    else mask_token
				)

				super().__init__(
				    lowerCamelCase__   ,		tokenizer_file=lowerCamelCase__   ,		do_lower_case=lowerCamelCase__   ,		remove_space=lowerCamelCase__   ,		keep_accents=lowerCamelCase__   ,		bos_token=lowerCamelCase__   ,		eos_token=lowerCamelCase__   ,		unk_token=lowerCamelCase__   ,		sep_token=lowerCamelCase__   ,		pad_token=lowerCamelCase__   ,		cls_token=lowerCamelCase__   ,		mask_token=lowerCamelCase__   ,		**lowerCamelCase__   ,		)

				_UpperCAmelCase     :				List[str]          =       do_lower_case
				_UpperCAmelCase     :				int          =       remove_space
				_UpperCAmelCase     :				int          =       keep_accents
				_UpperCAmelCase     :				List[Any]          =       vocab_file
				_UpperCAmelCase     :				int          =       False if not self.vocab_file else True
			def 				__snake_case			(		self   ,		_A   ,		_A = None  )     ->     List[int]:






				'''simple docstring'''







				_UpperCAmelCase     :				str          =       [self.sep_token_id]
				_UpperCAmelCase     :				Tuple          =       [self.cls_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 				__snake_case			(		self   ,		_A   ,		_A = None  )     ->     List[int]:






				'''simple docstring'''







				_UpperCAmelCase     :				int          =       [self.sep_token_id]
				_UpperCAmelCase     :				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 				__snake_case			(		self   ,		_A   ,		_A = None  )     ->     Tuple[str]:






				'''simple docstring'''







				if not self.can_save_slow_tokenizer:
					raise ValueError(
					    """Your fast tokenizer does not have the necessary information to save the vocabulary for a slow """
					    """tokenizer."""  )

				if not os.path.isdir(lowerCamelCase__  ):
					logger.error(f'''Vocabulary path ({save_directory}) should be a directory'''  )
					return
				_UpperCAmelCase     :				List[str]          =       os.path.join(
				    lowerCamelCase__   ,		(filename_prefix + """-""" if filename_prefix else """""") + VOCAB_FILES_NAMES["""vocab_file"""]  )

				if os.path.abspath(self.vocab_file  ) != os.path.abspath(lowerCamelCase__  ):
					copyfile(self.vocab_file   ,		lowerCamelCase__  )

				return (out_vocab_file,)









"""simple docstring"""


from decimal import Decimal, getcontext
from math import ceil, factorial


def    _lowerCamelCase   (     lowerCamelCase__	:							int  ):

 if not isinstance(lowerCamelCase__       ,		lowerCamelCase__  ):
  raise TypeError("""Undefined for non-integers"""  )
 elif precision < 1:
  raise ValueError("""Undefined for non-natural numbers"""  )

 lowercase__       :       List[str]				=						precision
 lowercase__       :       Optional[int]				=						ceil(precision / 14  )
 lowercase__       :       Union[str, Any]				=						42_68_80 * Decimal(1_00_05  ).sqrt()
 lowercase__       :       Optional[Any]				=						1
 lowercase__       :       Optional[Any]				=						13_59_14_09
 lowercase__       :       List[Any]				=						Decimal(lowerCamelCase__  )
 for k in range(1       ,		lowerCamelCase__  ):
  lowercase__       :       Optional[int]				=						factorial(6 * k  ) // (factorial(3 * k  ) * factorial(lowerCamelCase__  ) ** 3)
  linear_term += 5_45_14_01_34
  exponential_term *= -26_25_37_41_26_40_76_80_00
  partial_sum += Decimal(multinomial_term * linear_term  ) / exponential_term
 return str(constant_term / partial_sum  )[:-1]


if __name__ == "__main__":
   __snake_case    					=					50
   print(F"The first {n} digits of pi is: {pi(n)}")