"""simple docstring"""
def    lowerCAmelCase__    (			_UpperCamelCase       :				int					)					->				int:





      """simple docstring"""






      snake_case								=			abs(__lowerCAmelCase					)
      snake_case								=			0
      while n > 0:
            res += n % 1_0
            n //= 1_0
      return res





def    lowerCAmelCase__    (			_UpperCamelCase       :				int					)					->				int:





      """simple docstring"""






      snake_case								=			abs(__lowerCAmelCase					)
      return n if n < 1_0 else n % 1_0 + sum_of_digits(n // 1_0					)





def    lowerCAmelCase__    (			_UpperCamelCase       :				int					)					->				Dict:





      """simple docstring"""






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





def    lowerCAmelCase__    (			)					->				Dict:





      """simple docstring"""






      from collections.abc import Callable
      from timeit import timeit

      def benchmark_a_function(_UpperCamelCase       :				Callable ,			_UpperCamelCase       :				int					) -> 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 (2_6_2_1_4_4, 1_1_2_5_8_9_9_9_0_6_8_4_2_6_2_4, 1_2_6_7_6_5_0_6_0_0_2_2_8_2_2_9_4_0_1_4_9_6_7_0_3_2_0_5_3_7_6):
            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()



"""simple docstring"""
from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


SCREAMING_SNAKE_CASE__      						=  {"configuration_sew": ["SEW_PRETRAINED_CONFIG_ARCHIVE_MAP", "SEWConfig"]}

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					SCREAMING_SNAKE_CASE__      						=  [
					    "SEW_PRETRAINED_MODEL_ARCHIVE_LIST",
					    "SEWForCTC",
					    "SEWForSequenceClassification",
					    "SEWModel",
					    "SEWPreTrainedModel",
					]

if TYPE_CHECKING:
					from .configuration_sew import SEW_PRETRAINED_CONFIG_ARCHIVE_MAP, SEWConfig

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_sew import (
										    SEW_PRETRAINED_MODEL_ARCHIVE_LIST,
										    SEWForCTC,
										    SEWForSequenceClassification,
										    SEWModel,
										    SEWPreTrainedModel,
										)


else:
					import sys

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


