


"""simple docstring"""


import importlib.metadata
from typing import Union

from packaging.version import Version, parse

from .constants import STR_OPERATION_TO_FUNC


_snake_case        =				parse(importlib.metadata.version("torch"))



def 	snake_case    (					_a:  Union[str, Version]		, _a:  str		, _a:  str				)->		Any:
      '''simple docstring'''


      if operation not in STR_OPERATION_TO_FUNC.keys():
            raise ValueError(F'`operation` must be one of {list(STR_OPERATION_TO_FUNC.keys()				)}, received {operation}'				)
      lowerCamelCase__							     =		STR_OPERATION_TO_FUNC[operation]
      if isinstance(lowerCAmelCase_		, lowerCAmelCase_				):
            lowerCamelCase__							     =		parse(importlib.metadata.version(lowerCAmelCase_				)				)
      return operation(lowerCAmelCase_		, parse(lowerCAmelCase_				)				)






def 	snake_case    (					_a:  str		, _a:  str				)->		Any:
      '''simple docstring'''


      return compare_versions(lowerCAmelCase_		, lowerCAmelCase_		, lowerCAmelCase_				)







from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
)


SCREAMING_SNAKE_CASE						:str			=  {'''configuration_unispeech''': ['''UNISPEECH_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''UniSpeechConfig''']}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   SCREAMING_SNAKE_CASE						:List[str]			=  [
       '''UNISPEECH_PRETRAINED_MODEL_ARCHIVE_LIST''',
       '''UniSpeechForCTC''',
       '''UniSpeechForPreTraining''',
       '''UniSpeechForSequenceClassification''',
       '''UniSpeechModel''',
       '''UniSpeechPreTrainedModel''',
   ]

if TYPE_CHECKING:
   from .configuration_unispeech import UNISPEECH_PRETRAINED_CONFIG_ARCHIVE_MAP, UniSpeechConfig

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_unispeech import (
          UNISPEECH_PRETRAINED_MODEL_ARCHIVE_LIST,
          UniSpeechForCTC,
          UniSpeechForPreTraining,
          UniSpeechForSequenceClassification,
          UniSpeechModel,
          UniSpeechPreTrainedModel,
      )

else:
   import sys

   SCREAMING_SNAKE_CASE						:List[str]			=  _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)




