






def       lowercase__	(					A_:						Optional[int]  ,      A_:						Optional[Any]  ,      A_:						Optional[int]		)	->				Any:







       """simple docstring"""






       if n == 0:
              return 1

       elif n % 2 == 1:
              return (binary_exponentiation(A_  ,      n - 1  ,      A_		) * a) % mod

       else:
              __UpperCAmelCase     				=binary_exponentiation(A_  ,      n / 2  ,      A_		)
              return (b * b) % mod


# a prime number
__A					=	7_01

__A					=	10_00_00_00_00
__A					=	10

# using binary exponentiation function, O(log(p)):
print((a / b) % p == (a * binary_exponentiation(b, p - 2, p)) % p)





print((a / b) % p == (a * b ** (p - 2)) % p)










from packaging import version

from .import_utils import is_accelerate_available


if is_accelerate_available():
				import accelerate

def lowercase    (  SCREAMING_SNAKE_CASE )			->							Union[str, Any]:


			'''simple docstring'''







			if not is_accelerate_available():
						return method
			SCREAMING_SNAKE_CASE_								=						version.parse(accelerate.__version__ ).base_version
			if version.parse(SCREAMING_SNAKE_CASE ) < version.parse('0.17.0' ):
						return method

			def wrapper(self       ,    *SCREAMING_SNAKE_CASE       ,    **SCREAMING_SNAKE_CASE ):
						if hasattr(self       ,    '_hf_hook' ) and hasattr(self._hf_hook       ,    'pre_forward' ):
									self._hf_hook.pre_forward(self )
						return method(self       ,    *SCREAMING_SNAKE_CASE       ,    **SCREAMING_SNAKE_CASE )

			return wrapper
