'''simple docstring'''




def 							snake_case__				(     _A:   int					)       ->      int:

		'''simple docstring'''


		lowerCAmelCase     =    abs(_A					)
		lowerCAmelCase     =    0
		while n > 0:
				res += n % 10
				n //= 10
		return res






def 							snake_case__				(     _A:   int					)       ->      int:

		'''simple docstring'''


		lowerCAmelCase     =    abs(_A					)
		return n if n < 10 else n % 10 + sum_of_digits(n // 10					)






def 							snake_case__				(     _A:   int					)       ->      int:

		'''simple docstring'''


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






def 							snake_case__				(     )       ->      None:

		'''simple docstring'''


		from collections.abc import Callable
		from timeit import timeit

		def benchmark_a_function(_A:   Callable ,  _A:   int					) -> None:
				lowerCAmelCase     =    f"{func.__name__}({value})"
				lowerCAmelCase     =    timeit(f"__main__.{call}" ,  setup="""import __main__"""					)
				print(f"{call:56} = {func(_A					)} -- {timing:.4f} seconds"					)

		for value in (262144, 1125899906842624, 1267650600228229401496703205376):
				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()





'''simple docstring'''




from typing import TYPE_CHECKING

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


__lowercase        =    {
    '''configuration_chinese_clip''': [
        '''CHINESE_CLIP_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''ChineseCLIPConfig''',
        '''ChineseCLIPOnnxConfig''',
        '''ChineseCLIPTextConfig''',
        '''ChineseCLIPVisionConfig''',
    ],
    '''processing_chinese_clip''': ['''ChineseCLIPProcessor'''],
}

try:
						if not is_vision_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__lowercase        =    ['''ChineseCLIPFeatureExtractor''']
						__lowercase        =    ['''ChineseCLIPImageProcessor''']

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__lowercase        =    [
						    '''CHINESE_CLIP_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''ChineseCLIPModel''',
						    '''ChineseCLIPPreTrainedModel''',
						    '''ChineseCLIPTextModel''',
						    '''ChineseCLIPVisionModel''',
						]

if TYPE_CHECKING:
						from .configuration_chinese_clip import (
						    CHINESE_CLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
						    ChineseCLIPConfig,
						    ChineseCLIPOnnxConfig,
						    ChineseCLIPTextConfig,
						    ChineseCLIPVisionConfig,
						)
						from .processing_chinese_clip import ChineseCLIPProcessor

						try:
												if not is_vision_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .feature_extraction_chinese_clip import ChineseCLIPFeatureExtractor, ChineseCLIPImageProcessor

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_chinese_clip import (
												    CHINESE_CLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
												    ChineseCLIPModel,
												    ChineseCLIPPreTrainedModel,
												    ChineseCLIPTextModel,
												    ChineseCLIPVisionModel,
												)

else:
						import sys

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




