



"""simple docstring"""
def        lowerCAmelCase_						(							SCREAMING_SNAKE_CASE__	)			->      int:
		a_     :      List[Any] 						=     abs(SCREAMING_SNAKE_CASE__	)
		a_     :      List[str] 						=     0
		while n > 0:
				res += n % 10
				n //= 10
		return res



def        lowerCAmelCase_						(							SCREAMING_SNAKE_CASE__	)			->      int:
		a_     :      Optional[int] 						=     abs(SCREAMING_SNAKE_CASE__	)
		return n if n < 10 else n % 10 + sum_of_digits(n // 10	)



def        lowerCAmelCase_						(							SCREAMING_SNAKE_CASE__	)			->      int:
		return sum(int(SCREAMING_SNAKE_CASE__	) for c in str(abs(SCREAMING_SNAKE_CASE__	)	)	)



def        lowerCAmelCase_						(							)			->      None:
		from collections.abc import Callable
		from timeit import timeit

		def benchmark_a_function(SCREAMING_SNAKE_CASE__, SCREAMING_SNAKE_CASE__	) -> None:
				a_     :      Optional[int] 						=     F"""{func.__name__}({value})"""
				a_     :      Optional[int] 						=     timeit(F"""__main__.{call}""", setup="import __main__"	)
				print(F"""{call:56} = {func(SCREAMING_SNAKE_CASE__	)} -- {timing:.4f} seconds"""	)

		for value in (262_144, 1_125_899_906_842_624, 1_267_650_600_228_229_401_496_703_205_376):
				for func in (sum_of_digits, sum_of_digits_recursion, sum_of_digits_compact):
						benchmark_a_function(SCREAMING_SNAKE_CASE__, SCREAMING_SNAKE_CASE__	)
				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_bigbird_pegasus""": [
        """BIGBIRD_PEGASUS_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """BigBirdPegasusConfig""",
        """BigBirdPegasusOnnxConfig""",
    ],
}

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					SCREAMING_SNAKE_CASE_				= [
					    """BIGBIRD_PEGASUS_PRETRAINED_MODEL_ARCHIVE_LIST""",
					    """BigBirdPegasusForCausalLM""",
					    """BigBirdPegasusForConditionalGeneration""",
					    """BigBirdPegasusForQuestionAnswering""",
					    """BigBirdPegasusForSequenceClassification""",
					    """BigBirdPegasusModel""",
					    """BigBirdPegasusPreTrainedModel""",
					]


if TYPE_CHECKING:
					from .configuration_bigbird_pegasus import (
					    BIGBIRD_PEGASUS_PRETRAINED_CONFIG_ARCHIVE_MAP,
					    BigBirdPegasusConfig,
					    BigBirdPegasusOnnxConfig,
					)

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_bigbird_pegasus import (
										    BIGBIRD_PEGASUS_PRETRAINED_MODEL_ARCHIVE_LIST,
										    BigBirdPegasusForCausalLM,
										    BigBirdPegasusForConditionalGeneration,
										    BigBirdPegasusForQuestionAnswering,
										    BigBirdPegasusForSequenceClassification,
										    BigBirdPegasusModel,
										    BigBirdPegasusPreTrainedModel,
										)


else:
					import sys

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