

'''simple docstring'''

from ..utils import DummyObject, requires_backends




class 	A_			(    metaclass=__UpperCamelCase							):






     '''simple docstring'''



     UpperCAmelCase_						:     List[Any]  		=  ["flax", "transformers"]


     def __init__(		self			:					List[str]					,      *lowercase_			:					List[Any]					,      **lowercase_			:					Dict	)						->     Union[str, Any]:
      requires_backends(self					,      ['flax', 'transformers']	)


     @classmethod
     def        UpperCAmelCase_	(		cls			:					int					,      *lowercase_			:					str					,      **lowercase_			:					int	)						->     List[str]:
      requires_backends(cls					,      ['flax', 'transformers']	)




     @classmethod
     def        UpperCAmelCase_	(		cls			:					int					,      *lowercase_			:					Optional[int]					,      **lowercase_			:					Optional[int]	)						->     List[str]:
      requires_backends(cls					,      ['flax', 'transformers']	)




class 	A_			(    metaclass=__UpperCamelCase							):






     '''simple docstring'''



     UpperCAmelCase_						:     Any  		=  ["flax", "transformers"]


     def __init__(		self			:					int					,      *lowercase_			:					Optional[int]					,      **lowercase_			:					List[str]	)						->     int:
      requires_backends(self					,      ['flax', 'transformers']	)


     @classmethod
     def        UpperCAmelCase_	(		cls			:					int					,      *lowercase_			:					Any					,      **lowercase_			:					Union[str, Any]	)						->     List[str]:
      requires_backends(cls					,      ['flax', 'transformers']	)




     @classmethod
     def        UpperCAmelCase_	(		cls			:					Tuple					,      *lowercase_			:					List[Any]					,      **lowercase_			:					List[str]	)						->     int:
      requires_backends(cls					,      ['flax', 'transformers']	)




class 	A_			(    metaclass=__UpperCamelCase							):






     '''simple docstring'''



     UpperCAmelCase_						:     Tuple  		=  ["flax", "transformers"]


     def __init__(		self			:					Dict					,      *lowercase_			:					Tuple					,      **lowercase_			:					Union[str, Any]	)						->     List[str]:
      requires_backends(self					,      ['flax', 'transformers']	)


     @classmethod
     def        UpperCAmelCase_	(		cls			:					int					,      *lowercase_			:					int					,      **lowercase_			:					Tuple	)						->     Union[str, Any]:
      requires_backends(cls					,      ['flax', 'transformers']	)




     @classmethod
     def        UpperCAmelCase_	(		cls			:					Any					,      *lowercase_			:					int					,      **lowercase_			:					int	)						->     List[str]:
      requires_backends(cls					,      ['flax', 'transformers']	)




class 	A_			(    metaclass=__UpperCamelCase							):






     '''simple docstring'''



     UpperCAmelCase_						:     Optional[Any]  		=  ["flax", "transformers"]


     def __init__(		self			:					Any					,      *lowercase_			:					Dict					,      **lowercase_			:					int	)						->     List[Any]:
      requires_backends(self					,      ['flax', 'transformers']	)


     @classmethod
     def        UpperCAmelCase_	(		cls			:					Optional[int]					,      *lowercase_			:					str					,      **lowercase_			:					List[Any]	)						->     Union[str, Any]:
      requires_backends(cls					,      ['flax', 'transformers']	)




     @classmethod
     def        UpperCAmelCase_	(		cls			:					List[str]					,      *lowercase_			:					Union[str, Any]					,      **lowercase_			:					List[Any]	)						->     List[str]:
      requires_backends(cls					,      ['flax', 'transformers']	)







'''simple docstring'''

def 				UpperCamelCase(					UpperCAmelCase_  ,	UpperCAmelCase_     ):
 while a != 0:
  UpperCAmelCase ,			UpperCAmelCase	:     Tuple						 =			b % a, a
 return b




def 				UpperCamelCase(					UpperCAmelCase_  ,	UpperCAmelCase_     ):
 if gcd(UpperCAmelCase_  ,	UpperCAmelCase_     ) != 1:
  UpperCAmelCase	:     List[str]						 =			F"""mod inverse of {a!r} and {m!r} does not exist"""
  raise ValueError(UpperCAmelCase_     )
 UpperCAmelCase ,			UpperCAmelCase ,			UpperCAmelCase	:     Any						 =			1, 0, a
 UpperCAmelCase ,			UpperCAmelCase ,			UpperCAmelCase	:     Dict						 =			0, 1, m
 while va != 0:
  UpperCAmelCase	:     Tuple						 =			ua // va
  UpperCAmelCase ,			UpperCAmelCase ,			UpperCAmelCase ,			UpperCAmelCase ,			UpperCAmelCase ,			UpperCAmelCase	:     List[Any]						 =			(ua - q * va), (ua - q * va), (ua - q * va), va, va, va
 return ua % m




