

import math
from timeit import timeit




def       UpperCAmelCase__    (      _A				:			int							):





  '''simple docstring'''







  a__  =0
  a__  =abs(_A							)
  while True:
    a__  =n // 10
    digits += 1
    if n == 0:
      break
  return digits




def       UpperCAmelCase__    (      _A				:			Union[str, Any]							):





  '''simple docstring'''







  return 1 if n == 0 else math.floor(math.log(abs(_A							)     ,				10							) + 1							)




def       UpperCAmelCase__    (      _A				:			Optional[Any]							):





  '''simple docstring'''







  return len(str(abs(_A							)							)							)




def       UpperCAmelCase__    (      ):





  '''simple docstring'''







  from collections.abc import Callable

  def benchmark_a_function(_A				:			Any     ,				_A				:			Tuple							) -> None:
    a__  =F"""{func.__name__}({value})"""
    a__  =timeit(F"""__main__.{call}"""     ,				setup='''import __main__'''							)
    print(F"""{call}: {func(_A							)} -- {timing} seconds"""							)

  for value in (26_21_44, 11_25_89_99_06_84_26_24, 1_26_76_50_60_02_28_22_94_01_49_67_03_20_53_76):
    for func in (num_digits, num_digits_fast, num_digits_faster):
      benchmark_a_function(_A     ,				_A							)
    print()


if __name__ == "__main__":
       import doctest

       doctest.testmod()
       benchmark()



# tests directory-specific settings - this file is run automatically
# by pytest before any tests are run

import sys
import warnings
from os.path import abspath, dirname, join


# allow having multiple repository checkouts and not needing to remember to rerun
# 'pip install -e .[dev]' when switching between checkouts and running tests.
lowerCamelCase									= abspath(join(dirname(dirname(dirname(__file__))), '''src'''))
sys.path.insert(1, git_repo_path)


# silence FutureWarning warnings in tests since often we can't act on them until
# they become normal warnings - i.e. the tests still need to test the current functionality
warnings.simplefilter(action='''ignore''', category=FutureWarning)




def       UpperCAmelCase__    (      _A				:			List[Any]							):





  '''simple docstring'''







  from diffusers.utils.testing_utils import pytest_addoption_shared

  pytest_addoption_shared(_A							)




def       UpperCAmelCase__    (      _A				:			int							):





  '''simple docstring'''







  from diffusers.utils.testing_utils import pytest_terminal_summary_main

  a__  =terminalreporter.config.getoption('''--make-reports'''							)
  if make_reports:
    pytest_terminal_summary_main(_A     ,				id=_A							)
