





"""simple docstring"""




def 							SCREAMING_SNAKE_CASE__  (      __a				):
	snake_case_						:     Optional[Any]     =		abs(__a				)
	snake_case_						:     Dict     =		0
	while n > 0:
		res += n % 10
		n //= 10
	return res


def 							SCREAMING_SNAKE_CASE__  (      __a				):
	snake_case_						:     List[str]     =		abs(__a				)
	return n if n < 10 else n % 10 + sum_of_digits(n // 10				)


def 							SCREAMING_SNAKE_CASE__  (      __a				):
	return sum(int(__a				) for c in str(abs(__a				)				)				)


def 							SCREAMING_SNAKE_CASE__  (      ):
	from collections.abc import Callable
	from timeit import timeit

	def benchmark_a_function(__a				,	__a				) -> None:
		snake_case_						:     List[Any]     =		f"""{func.__name__}({value})"""
		snake_case_						:     Tuple     =		timeit(f"""__main__.{call}"""				,	setup='import __main__'				)
		print(f"""{call:56} = {func(__a				)} -- {timing:.4f} seconds"""				)

	for value in (26_21_44, 11_25_89_99_06_84_26_24, 1_26_76_50_60_02_28_22_94_01_49_67_03_20_53_76):
		for func in (sum_of_digits, sum_of_digits_recursion, sum_of_digits_compact):
			benchmark_a_function(__a				,	__a				)
		print()


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						benchmark()








from typing import TYPE_CHECKING

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


_SCREAMING_SNAKE_CASE 		=						{
    """configuration_mctct""": ["""MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """MCTCTConfig"""],
    """feature_extraction_mctct""": ["""MCTCTFeatureExtractor"""],
    """processing_mctct""": ["""MCTCTProcessor"""],
}


try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_SCREAMING_SNAKE_CASE 		=						[
						    """MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """MCTCTForCTC""",
						    """MCTCTModel""",
						    """MCTCTPreTrainedModel""",
						]


if TYPE_CHECKING:
						from .configuration_mctct import MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP, MCTCTConfig
						from .feature_extraction_mctct import MCTCTFeatureExtractor
						from .processing_mctct import MCTCTProcessor

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_mctct import MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST, MCTCTForCTC, MCTCTModel, MCTCTPreTrainedModel

else:
						import sys

						_SCREAMING_SNAKE_CASE 		=						_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)

