





def 	lowerCamelCase_		(							_UpperCamelCase					,							_UpperCamelCase					,							_UpperCamelCase					)						->		Optional[Any]:






				"""simple docstring"""


				if n == 0:
								return 1

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

				else:
								snake_case_		:       Optional[Any]           =    binary_exponentiation(_UpperCamelCase					,							n / 2					,							_UpperCamelCase					)
								return (b * b) % mod


# a prime number
lowerCAmelCase_        =							7_0_1

lowerCAmelCase_        =							1_0_0_0_0_0_0_0_0_0
lowerCAmelCase_        =							1_0

# 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)







import pytest
import requests

from datasets.utils.file_utils import http_head

from .utils import OfflineSimulationMode, RequestWouldHangIndefinitelyError, offline





@pytest.mark.integration
def  __magic_name__  (				)				-> Union[str, Any]:

							"""simple docstring"""



							with offline(OfflineSimulationMode.CONNECTION_TIMES_OUT				):
														with pytest.raises(lowercase				):
																					requests.request("""GET"""				,       """https://huggingface.co"""				)
														with pytest.raises(requests.exceptions.ConnectTimeout				):
																					requests.request("""GET"""				,       """https://huggingface.co"""				,       timeout=1.0				)





@pytest.mark.integration
def  __magic_name__  (				)				-> Union[str, Any]:

							"""simple docstring"""



							with offline(OfflineSimulationMode.CONNECTION_FAILS				):
														with pytest.raises(requests.exceptions.ConnectionError				):
																					requests.request("""GET"""				,       """https://huggingface.co"""				)





def  __magic_name__  (				)				-> Dict:

							"""simple docstring"""



							with offline(OfflineSimulationMode.HF_DATASETS_OFFLINE_SET_TO_1				):
														with pytest.raises(lowercase				):
																					http_head("""https://huggingface.co"""				)