




'''simple docstring'''

def 		__magic_name__    (	__UpperCAmelCase	)		->					int:

					'''simple docstring'''

					snake_case_									=				abs(__UpperCAmelCase	)
					snake_case_									=				0
					while n > 0:
										res += n % 10
										n //= 10
					return res


def 		__magic_name__    (	__UpperCAmelCase	)		->					int:

					'''simple docstring'''

					snake_case_									=				abs(__UpperCAmelCase	)
					return n if n < 10 else n % 10 + sum_of_digits(n // 10	)


def 		__magic_name__    (	__UpperCAmelCase	)		->					int:

					'''simple docstring'''

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


def 		__magic_name__    (	)		->					None:

					'''simple docstring'''

					from collections.abc import Callable
					from timeit import timeit

					def benchmark_a_function(__UpperCAmelCase,      __UpperCAmelCase	) -> None:
										snake_case_									=				F"{func.__name__}({value})"
										snake_case_									=				timeit(F"__main__.{call}",      setup='''import __main__'''	)
										print(F"{call:56} = {func(__UpperCAmelCase	)} -- {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(__UpperCAmelCase,      __UpperCAmelCase	)
										print()


if __name__ == "__main__":
							import doctest

							doctest.testmod()
							benchmark()


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
)


a_    					=       {'configuration_encoder_decoder': ['EncoderDecoderConfig']}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   a_    					=       ['EncoderDecoderModel']

try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   a_    					=       ['TFEncoderDecoderModel']

try:
   if not is_flax_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   a_    					=       ['FlaxEncoderDecoderModel']

if TYPE_CHECKING:
   from .configuration_encoder_decoder import EncoderDecoderConfig

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_encoder_decoder import EncoderDecoderModel

   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_encoder_decoder import TFEncoderDecoderModel

   try:
      if not is_flax_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_flax_encoder_decoder import FlaxEncoderDecoderModel

else:
   import sys

   a_    					=       _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)



