






import json
import os
import tempfile

from transformers.testing_utils import check_json_file_has_correct_format



class   lowerCamelCase				:







		'''simple docstring'''



		_snake_case   :   int							=  None



		def  __UpperCAmelCase      (							self       )     ->							List[Any]:
							UpperCAmelCase_   :				List[Any]						=						self.feature_extraction_class(**self.feat_extract_dict       )
							UpperCAmelCase_   :				List[Any]						=						json.loads(feat_extract.to_json_string()       )
							for key, value in self.feat_extract_dict.items():
												self.assertEqual(obj[key]    ,		_UpperCamelCase       )



		def  __UpperCAmelCase      (							self       )     ->							Optional[int]:
							UpperCAmelCase_   :				List[Any]						=						self.feature_extraction_class(**self.feat_extract_dict       )

							with tempfile.TemporaryDirectory() as tmpdirname:
												UpperCAmelCase_   :				Tuple						=						os.path.join(_UpperCamelCase    ,		'feat_extract.json'       )
												feat_extract_first.to_json_file(_UpperCamelCase       )
												UpperCAmelCase_   :				int						=						self.feature_extraction_class.from_json_file(_UpperCamelCase       )

							self.assertEqual(feat_extract_second.to_dict()    ,		feat_extract_first.to_dict()       )



		def  __UpperCAmelCase      (							self       )     ->							Any:
							UpperCAmelCase_   :				str						=						self.feature_extraction_class(**self.feat_extract_dict       )

							with tempfile.TemporaryDirectory() as tmpdirname:
												UpperCAmelCase_   :				Dict						=						feat_extract_first.save_pretrained(_UpperCamelCase       )[0]
												check_json_file_has_correct_format(_UpperCamelCase       )
												UpperCAmelCase_   :				Dict						=						self.feature_extraction_class.from_pretrained(_UpperCamelCase       )

							self.assertEqual(feat_extract_second.to_dict()    ,		feat_extract_first.to_dict()       )



		def  __UpperCAmelCase      (							self       )     ->							Tuple:
							UpperCAmelCase_   :				Any						=						self.feature_extraction_class()
							self.assertIsNotNone(_UpperCamelCase       )














def 					lowercase__				(					__snake_case   :							str					,	__snake_case   :							int					,	__snake_case   :							List[str]  ):


					'''simple docstring'''


					if n == 0:
										return 1

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

					else:
										UpperCAmelCase_   :				Optional[int]						=						binary_exponentiation(__snake_case					,	n / 2					,	__snake_case  )
										return (b * b) % mod


# a prime number
__UpperCAmelCase     							=						701

__UpperCAmelCase     							=						1000000000
__UpperCAmelCase     							=						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)






