'''simple docstring'''




_lowercase		:				List[Any]	       =		"Input must be a string of 8 numbers plus letter"
_lowercase		:				Any	       =		"TRWAGMYFPDXBNJZSQVHLCKE"




def 							lowerCamelCase			(   UpperCAmelCase__ :      str				)    ->   bool:

							if not isinstance(UpperCAmelCase__   ,   UpperCAmelCase__				):
														lowercase_      :    str       		= F'''Expected string as input, found {type(UpperCAmelCase__				).__name__}'''
														raise TypeError(UpperCAmelCase__				)

							lowercase_      :    Tuple       		= spanish_id.replace("""-"""   ,   """"""				).upper()
							if len(UpperCAmelCase__				) != 9:
														raise ValueError(UpperCAmelCase__				)

							try:
														lowercase_      :    Any       		= int(spanish_id_clean[0:8]				)
														lowercase_      :    List[str]       		= spanish_id_clean[8]
							except ValueError as ex:
														raise ValueError(UpperCAmelCase__				) from ex

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

							return letter == LOOKUP_LETTERS[number % 23]


if __name__ == "__main__":
						import doctest

						doctest.testmod()






'''simple docstring'''




import pytest

import datasets.config
from datasets.utils.info_utils import is_small_dataset




@pytest.mark.parametrize("""dataset_size"""   ,   [None, 400 * 2**20, 600 * 2**20]				)
@pytest.mark.parametrize("""input_in_memory_max_size"""   ,   ["""default""", 0, 100 * 2**20, 900 * 2**20]				)
def 							lowerCamelCase			(   UpperCAmelCase__ :      Union[str, Any]   ,   UpperCAmelCase__ :      List[Any]   ,   UpperCAmelCase__ :      str				)    ->   Any:
							if input_in_memory_max_size != "default":
														monkeypatch.setattr(datasets.config   ,   """IN_MEMORY_MAX_SIZE"""   ,   UpperCAmelCase__				)
							lowercase_      :    List[Any]       		= datasets.config.IN_MEMORY_MAX_SIZE
							if input_in_memory_max_size == "default":
														assert in_memory_max_size == 0
							else:
														assert in_memory_max_size == input_in_memory_max_size
							if dataset_size and in_memory_max_size:
														lowercase_      :    str       		= dataset_size < in_memory_max_size
							else:
														lowercase_      :    List[Any]       		= False
							lowercase_      :    Any       		= is_small_dataset(UpperCAmelCase__				)
							assert result == expected





