



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available, is_tokenizers_available


UpperCamelCase_      			=  {}

try:
							if not is_sentencepiece_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							UpperCamelCase_      			=  ["CpmTokenizer"]

try:
							if not is_tokenizers_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							UpperCamelCase_      			=  ["CpmTokenizerFast"]


if TYPE_CHECKING:
							try:
														if not is_sentencepiece_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .tokenization_cpm import CpmTokenizer

							try:
														if not is_tokenizers_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .tokenization_cpm_fast import CpmTokenizerFast

else:
							import sys

							UpperCamelCase_      			=  _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)













from __future__ import annotations

from enum import Enum, unique
from typing import TypeVar

# Create a generic variable that can be 'Enum', or any subclass.
lowerCamelCase					    =	TypeVar('''T''', bound='''Enum''')

@unique
class        snake_case_				(							lowercase_   ):







   """simple docstring"""



   __lowerCAmelCase  =    80
   __lowerCAmelCase  =    70
   __lowerCAmelCase  =    60
   __lowerCAmelCase  =    50
   __lowerCAmelCase  =    40
   __lowerCAmelCase  =    30
   __lowerCAmelCase  =    20
   __lowerCAmelCase  =    10






@unique
class        snake_case_				(							lowercase_   ):







   """simple docstring"""



   __lowerCAmelCase  =    24
   __lowerCAmelCase  =    21
   __lowerCAmelCase  =    18
   __lowerCAmelCase  =    15
   __lowerCAmelCase  =    12
   __lowerCAmelCase  =    9
   __lowerCAmelCase  =    6
   __lowerCAmelCase  =    3
   __lowerCAmelCase  =    2
   __lowerCAmelCase  =    1
   __lowerCAmelCase  =    -1
   __lowerCAmelCase  =    -2
   __lowerCAmelCase  =    -3
   __lowerCAmelCase  =    -6
   __lowerCAmelCase  =    -9
   __lowerCAmelCase  =    -12
   __lowerCAmelCase  =    -15
   __lowerCAmelCase  =    -18
   __lowerCAmelCase  =    -21
   __lowerCAmelCase  =    -24

   @classmethod
   def       SCREAMING_SNAKE_CASE__					(     cls:						type[T]						)	->		dict:


       """simple docstring"""



       return {unit.name: unit.value for unit in cls if unit.value > 0}

   @classmethod
   def       SCREAMING_SNAKE_CASE__					(     cls:						type[T]						)	->		dict:


       """simple docstring"""



       return {unit.name: unit.value for unit in cls if unit.value < 0}






def 							UpperCAmelCase   ( _lowercase   ):


    '''simple docstring'''



    _lowercase     			=						SIUnit.get_positive() if value > 0 else SIUnit.get_negative()
    for name_prefix, value_prefix in prefixes.items():
        _lowercase     			=						value / (10**value_prefix)
        if numerical_part > 1:
            return f'''{numerical_part!s} {name_prefix}'''
    return str(_lowercase   )
def 							UpperCAmelCase   ( _lowercase   ):


    '''simple docstring'''



    for prefix in BinaryUnit:
        _lowercase     			=						value / (2**prefix.value)
        if numerical_part > 1:
            return f'''{numerical_part!s} {prefix.name}'''
    return str(_lowercase   )


if __name__ == "__main__":
   import doctest

   doctest.testmod()
