



"""simple docstring"""
def  lowerCamelCase_						(UpperCamelCase__		:		int							):
    _UpperCAmelCase							:  Optional[Any]											=    abs(UpperCamelCase__							)
    _UpperCAmelCase							:  List[Any]											=    0
    while n > 0:
        res += n % 10
        n //= 10
    return res





def  lowerCamelCase_						(UpperCamelCase__		:		int							):
    _UpperCAmelCase							:  Dict											=    abs(UpperCamelCase__							)
    return n if n < 10 else n % 10 + sum_of_digits(n // 10							)





def  lowerCamelCase_						(UpperCamelCase__		:		int							):
    return sum(int(UpperCamelCase__							) for c in str(abs(UpperCamelCase__							)							)							)





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

    def benchmark_a_function(UpperCamelCase__		:		Callable     ,       UpperCamelCase__		:		int							) -> None:
        _UpperCAmelCase							:  Optional[int]											=    F'{func.__name__}({value})'
        _UpperCAmelCase							:  Any											=    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()







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

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


_lowerCAmelCase    :str     =					{
    'configuration_squeezebert': [
        'SQUEEZEBERT_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'SqueezeBertConfig',
        'SqueezeBertOnnxConfig',
    ],
    'tokenization_squeezebert': ['SqueezeBertTokenizer'],
}

try:
  if not is_tokenizers_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _lowerCAmelCase    :Optional[int]     =					['SqueezeBertTokenizerFast']

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _lowerCAmelCase    :str     =					[
      'SQUEEZEBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
      'SqueezeBertForMaskedLM',
      'SqueezeBertForMultipleChoice',
      'SqueezeBertForQuestionAnswering',
      'SqueezeBertForSequenceClassification',
      'SqueezeBertForTokenClassification',
      'SqueezeBertModel',
      'SqueezeBertModule',
      'SqueezeBertPreTrainedModel',
  ]


if TYPE_CHECKING:
  from .configuration_squeezebert import (
      SQUEEZEBERT_PRETRAINED_CONFIG_ARCHIVE_MAP,
      SqueezeBertConfig,
      SqueezeBertOnnxConfig,
  )
  from .tokenization_squeezebert import SqueezeBertTokenizer

  try:
    if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .tokenization_squeezebert_fast import SqueezeBertTokenizerFast

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_squeezebert import (
        SQUEEZEBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
        SqueezeBertForMaskedLM,
        SqueezeBertForMultipleChoice,
        SqueezeBertForQuestionAnswering,
        SqueezeBertForSequenceClassification,
        SqueezeBertForTokenClassification,
        SqueezeBertModel,
        SqueezeBertModule,
        SqueezeBertPreTrainedModel,
    )

else:
  import sys

  _lowerCAmelCase    :Optional[Any]     =					_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)


