

import math
from timeit import timeit







def _a			(	SCREAMING_SNAKE_CASE		:      int		)   ->   int:

 """simple docstring"""






 __lowerCAmelCase:       str            =				0
 __lowerCAmelCase:       Optional[Any]            =				abs(SCREAMING_SNAKE_CASE		)
 while True:
  __lowerCAmelCase:       List[Any]            =				n // 10
  digits += 1
  if n == 0:
   break
 return digits







def _a			(	SCREAMING_SNAKE_CASE		:      int		)   ->   int:

 """simple docstring"""






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







def _a			(	SCREAMING_SNAKE_CASE		:      int		)   ->   int:

 """simple docstring"""






 return len(str(abs(SCREAMING_SNAKE_CASE		)		)		)







def _a			(	)   ->   None:

 """simple docstring"""






 from collections.abc import Callable

 def benchmark_a_function(SCREAMING_SNAKE_CASE		:      Callable   , SCREAMING_SNAKE_CASE		:      int		) -> None:
  __lowerCAmelCase:       str            =				f'''{func.__name__}({value})'''
  __lowerCAmelCase:       List[str]            =				timeit(f'''__main__.{call}'''   , setup='import __main__'		)
  print(f'''{call}: {func(SCREAMING_SNAKE_CASE		)} -- {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(SCREAMING_SNAKE_CASE   , SCREAMING_SNAKE_CASE		)
  print()


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  benchmark()








import torch

from transformers import PreTrainedModel

from .custom_configuration import CustomConfig, NoSuperInitConfig






class 							A_			(		snake_case__ ):
     _lowercase      :					Any       =     CustomConfig


     def __init__(							self      :		List[Any]      ,  UpperCAmelCase      :		Optional[Any] )							->     int:
      super().__init__(UpperCAmelCase )
      __lowerCAmelCase:       Tuple            =				torch.nn.Linear(config.hidden_size      ,  config.hidden_size )


     def   UpperCAmelCase  (							self      :		Optional[int]      ,  UpperCAmelCase      :		Tuple )							->     Union[str, Any]:
      return self.linear(UpperCAmelCase )


     def   UpperCAmelCase  (							self      :		str      ,  UpperCAmelCase      :		str )							->     Optional[int]:
      pass







class 							A_			(		snake_case__ ):
     _lowercase      :					str       =     NoSuperInitConfig


     def __init__(							self      :		List[Any]      ,  UpperCAmelCase      :		Union[str, Any] )							->     int:
      super().__init__(UpperCAmelCase )
      __lowerCAmelCase:       int            =				torch.nn.Linear(config.attribute      ,  config.attribute )


     def   UpperCAmelCase  (							self      :		Tuple      ,  UpperCAmelCase      :		Tuple )							->     Tuple:
      return self.linear(UpperCAmelCase )


     def   UpperCAmelCase  (							self      :		Optional[Any]      ,  UpperCAmelCase      :		Any )							->     str:
      pass





