


'''simple docstring'''






__A   :    Union[str, Any]											= "Input must be a string of 8 numbers plus letter"
__A   :    Dict											= "TRWAGMYFPDXBNJZSQVHLCKE"







def 							UpperCamelCase_     (       A__   :  str   ):
  '''simple docstring'''





  if not isinstance(A__				,       A__   ):
    lowerCAmelCase_     : Optional[Any]     =  f'Expected string as input, found {type(A__   ).__name__}'
    raise TypeError(A__   )

  lowerCAmelCase_     : str     =  spanish_id.replace("""-"""				,       """"""   ).upper()
  if len(A__   ) != 9:
    raise ValueError(A__   )

  try:
    lowerCAmelCase_     : Union[str, Any]     =  int(spanish_id_clean[0:8]   )
    lowerCAmelCase_     : List[Any]     =  spanish_id_clean[8]
  except ValueError as ex:
    raise ValueError(A__   ) from ex

  if letter.isdigit():
    raise ValueError(A__   )

  return letter == LOOKUP_LETTERS[number % 23]


if __name__ == "__main__":
  import doctest

  doctest.testmod()







'''simple docstring'''






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_speech_available, is_torch_available


__A   :    str											= {
    "configuration_audio_spectrogram_transformer": [
        "AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "ASTConfig",
    ]
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __A   :    List[str]											= [
      "AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
      "ASTForAudioClassification",
      "ASTModel",
      "ASTPreTrainedModel",
  ]

try:
  if not is_speech_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __A   :    Union[str, Any]											= ["ASTFeatureExtractor"]

if TYPE_CHECKING:
  from .configuration_audio_spectrogram_transformer import (
      AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
      ASTConfig,
  )

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_audio_spectrogram_transformer import (
        AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
        ASTForAudioClassification,
        ASTModel,
        ASTPreTrainedModel,
    )

  try:
    if not is_speech_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .feature_extraction_audio_spectrogram_transformer import ASTFeatureExtractor


else:
  import sys

  __A   :    List[Any]											= _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)



