


A							:					int     						=     'Input must be a string of 8 numbers plus letter'
A							:					List[Any]     						=     'TRWAGMYFPDXBNJZSQVHLCKE'





def 	_lowerCAmelCase       (    _lowerCAmelCase )						->	bool:


						'''simple docstring'''






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

						__snake_case				=		spanish_id.replace("-"      ,	"" ).upper()
						if len(_lowerCAmelCase ) != 9:
												raise ValueError(_lowerCAmelCase )

						try:
												__snake_case				=		int(spanish_id_clean[0:8] )
												__snake_case				=		spanish_id_clean[8]
						except ValueError as ex:
												raise ValueError(_lowerCAmelCase ) from ex

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

						return letter == LOOKUP_LETTERS[number % 23]


if __name__ == "__main__":
	import doctest

	doctest.testmod()









def 	_lowerCAmelCase       (    _lowerCAmelCase )						->	int:


						'''simple docstring'''






						__snake_case				=		abs(_lowerCAmelCase )
						__snake_case				=		0
						while n > 0:
												res += n % 10
												n //= 10
						return res





def 	_lowerCAmelCase       (    _lowerCAmelCase )						->	int:


						'''simple docstring'''






						__snake_case				=		abs(_lowerCAmelCase )
						return n if n < 10 else n % 10 + sum_of_digits(n // 10 )





def 	_lowerCAmelCase       (    _lowerCAmelCase )						->	int:


						'''simple docstring'''






						return sum(int(_lowerCAmelCase ) for c in str(abs(_lowerCAmelCase ) ) )





def 	_lowerCAmelCase       (    )						->	None:


						'''simple docstring'''






						from collections.abc import Callable
						from timeit import timeit

						def benchmark_a_function(_lowerCAmelCase      ,	_lowerCAmelCase ) -> None:
												__snake_case				=		F'''{func.__name__}({value})'''
												__snake_case				=		timeit(F'''__main__.{call}'''      ,	setup="import __main__" )
												print(F'''{call:56} = {func(_lowerCAmelCase )} -- {timing:.4f} seconds''' )

						for value in (26_2144, 1125_8999_0684_2624, 126_7650_6002_2822_9401_4967_0320_5376):
												for func in (sum_of_digits, sum_of_digits_recursion, sum_of_digits_compact):
																		benchmark_a_function(_lowerCAmelCase      ,	_lowerCAmelCase )
												print()


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	benchmark()





