



"""simple docstring"""







def   lowerCAmelCase__			(     lowerCamelCase__			) ->							int:
       A         =					abs(UpperCamelCase__			)
       A         =					0
       while n > 0:
              res += n % 10
              n //= 10
       return res

def   lowerCAmelCase__			(     lowerCamelCase__			) ->							int:
       A         =					abs(UpperCamelCase__			)
       return n if n < 10 else n % 10 + sum_of_digits(n // 10			)

def   lowerCAmelCase__			(     lowerCamelCase__			) ->							Union[str, Any]:
       return sum(int(UpperCamelCase__			) for c in str(abs(UpperCamelCase__			)			)			)

def   lowerCAmelCase__			(     ) ->							int:
       from collections.abc import Callable
       from timeit import timeit

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


if __name__ == "__main__":
       import doctest

       doctest.testmod()
       benchmark()








"""simple docstring"""







from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
)


A    =			{'configuration_plbart': ['PLBART_PRETRAINED_CONFIG_ARCHIVE_MAP', 'PLBartConfig']}

try:
							if not is_sentencepiece_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							A    =			['PLBartTokenizer']

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							A    =			[
							    'PLBART_PRETRAINED_MODEL_ARCHIVE_LIST',
							    'PLBartForCausalLM',
							    'PLBartForConditionalGeneration',
							    'PLBartForSequenceClassification',
							    'PLBartModel',
							    'PLBartPreTrainedModel',
							]


if TYPE_CHECKING:
							from .configuration_plbart import PLBART_PRETRAINED_CONFIG_ARCHIVE_MAP, PLBartConfig

							try:
														if not is_sentencepiece_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .tokenization_plbart import PLBartTokenizer

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_plbart import (
														    PLBART_PRETRAINED_MODEL_ARCHIVE_LIST,
														    PLBartForCausalLM,
														    PLBartForConditionalGeneration,
														    PLBartForSequenceClassification,
														    PLBartModel,
														    PLBartPreTrainedModel,
														)


else:
							import sys

							A    =			_LazyModule(__name__, globals()['__file__'], _import_structure)



