

'''simple docstring'''



from typing import TYPE_CHECKING

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


SCREAMING_SNAKE_CASE_    =   {}

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

try:
   if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   SCREAMING_SNAKE_CASE_    =   ["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

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






'''simple docstring'''



from __future__ import annotations

def   lowerCamelCase__       (      a__)		->    int | float:



    """simple docstring"""







    _snake_case : int												=		sorted(a__)
    _snake_case : List[str]												=		len(a__)
    _snake_case : Union[str, Any]												=		length >> 1
    return (
        (sorted_list[mid_index] + sorted_list[mid_index - 1]) / 2
        if length % 2 == 0
        else sorted_list[mid_index]
    )

def   lowerCamelCase__       (      )		->    Union[str, Any]:



    """simple docstring"""







    import doctest

    doctest.testmod()


if __name__ == "__main__":
   main()



