


_lowercase				     = 'Input must be a string of 8 numbers plus letter'
_lowercase				     = 'TRWAGMYFPDXBNJZSQVHLCKE'

def 		__lowerCAmelCase   (							_UpperCamelCase		)    ->				bool:






      '''simple docstring'''

      if not isinstance(__A       ,			__A		):
            lowerCamelCase__:						Any							   = f"""Expected string as input, found {type(__A		).__name__}"""
            raise TypeError(__A		)

      lowerCamelCase__:						int							   = spanish_id.replace("""-"""       ,			""""""		).upper()
      if len(__A		) != 9:
            raise ValueError(__A		)

      try:
            lowerCamelCase__:						Tuple							   = int(spanish_id_clean[0:8]		)
            lowerCamelCase__:						Optional[int]							   = 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()














from typing import TYPE_CHECKING

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


UpperCAmelCase__      			=						{
    '''configuration_poolformer''': [
        '''POOLFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''PoolFormerConfig''',
        '''PoolFormerOnnxConfig''',
    ]
}

try:
			if not is_vision_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			UpperCAmelCase__      			=						['''PoolFormerFeatureExtractor''']
			UpperCAmelCase__      			=						['''PoolFormerImageProcessor''']

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			UpperCAmelCase__      			=						[
			    '''POOLFORMER_PRETRAINED_MODEL_ARCHIVE_LIST''',
			    '''PoolFormerForImageClassification''',
			    '''PoolFormerModel''',
			    '''PoolFormerPreTrainedModel''',
			]


if TYPE_CHECKING:
			from .configuration_poolformer import (
			    POOLFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
			    PoolFormerConfig,
			    PoolFormerOnnxConfig,
			)

			try:
						if not is_vision_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .feature_extraction_poolformer import PoolFormerFeatureExtractor
						from .image_processing_poolformer import PoolFormerImageProcessor

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_poolformer import (
						    POOLFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
						    PoolFormerForImageClassification,
						    PoolFormerModel,
						    PoolFormerPreTrainedModel,
						)


else:
			import sys

			UpperCAmelCase__      			=						_LazyModule(__name__, globals()['''__file__'''], _import_structure)





