
"""simple docstring"""


from __future__ import annotations






def    lowercase	(  lowerCAmelCase__  ,lowerCAmelCase__  ,lowerCAmelCase__	):
			assert (
			    c % greatest_common_divisor(lowerCAmelCase__  ,lowerCAmelCase__	) == 0
			)  # greatest_common_divisor(a,b) function implemented below
			((lowerCamelCase_)		,   (lowerCamelCase_)		,   (lowerCamelCase_)) 		=     extended_gcd(lowerCAmelCase__  ,lowerCAmelCase__	)  # extended_gcd(a,b) function implemented below
			lowerCamelCase_ 		=     c / d
			return (r * x, r * y)






def    lowercase	(  lowerCAmelCase__  ,lowerCAmelCase__  ,lowerCAmelCase__  ,lowerCAmelCase__ = 2	):
			((lowerCamelCase_)		,   (lowerCamelCase_)) 		=     diophantine(lowerCAmelCase__  ,lowerCAmelCase__  ,lowerCAmelCase__	)  # Initial value
			lowerCamelCase_ 		=     greatest_common_divisor(lowerCAmelCase__  ,lowerCAmelCase__	)
			lowerCamelCase_ 		=     a // d
			lowerCamelCase_ 		=     b // d

			for i in range(lowerCAmelCase__	):
						lowerCamelCase_ 		=     xa + i * q
						lowerCamelCase_ 		=     ya - i * p
						print(lowerCAmelCase__  ,lowerCAmelCase__	)






def    lowercase	(  lowerCAmelCase__  ,lowerCAmelCase__	):
			if a < b:
						lowerCamelCase_		,   lowerCamelCase_ 		=     b, a

			while a % b != 0:
						lowerCamelCase_		,   lowerCamelCase_ 		=     b, a % b

			return b






def    lowercase	(  lowerCAmelCase__  ,lowerCAmelCase__	):
			assert a >= 0 and b >= 0

			if b == 0:
						lowerCamelCase_		,   lowerCamelCase_		,   lowerCamelCase_ 		=     a, 1, 0
			else:
						((lowerCamelCase_)		,   (lowerCamelCase_)		,   (lowerCamelCase_)) 		=     extended_gcd(lowerCAmelCase__  ,a % b	)
						lowerCamelCase_ 		=     q
						lowerCamelCase_ 		=     p - q * (a // b)

			assert a % d == 0 and b % d == 0
			assert d == a * x + b * y

			return (d, x, y)


if __name__ == "__main__":
						from doctest import testmod

						testmod(name="""diophantine""", verbose=True)
						testmod(name="""diophantine_all_soln""", verbose=True)
						testmod(name="""extended_gcd""", verbose=True)
						testmod(name="""greatest_common_divisor""", verbose=True)





"""simple docstring"""


import copy

from transformers.configuration_utils import PretrainedConfig
from transformers.utils import logging


A_						       =				logging.get_logger(__name__)




class    __lowerCamelCase     (   lowerCAmelCase ):
				a__:			List[str]									=						'hybrid-clip'
				a__:			List[Any]									=						True




				def __init__(							self       ,	UpperCAmelCase=512       ,	**UpperCAmelCase      ):
							super().__init__(**UpperCAmelCase      )

							if "text_config" not in kwargs:
										raise ValueError('''`text_config` can not be `None`.'''      )

							if "vision_config" not in kwargs:
										raise ValueError('''`vision_config` can not be `None`.'''      )

							lowerCamelCase_ 		=     kwargs.pop('''text_config'''      )
							lowerCamelCase_ 		=     kwargs.pop('''vision_config'''      )

							lowerCamelCase_ 		=     text_config.pop('''model_type'''      )
							lowerCamelCase_ 		=     vision_config.pop('''model_type'''      )

							from transformers import AutoConfig

							lowerCamelCase_ 		=     AutoConfig.for_model(UpperCAmelCase       ,	**UpperCAmelCase      )

							if vision_model_type == "clip":
										lowerCamelCase_ 		=     AutoConfig.for_model(UpperCAmelCase       ,	**UpperCAmelCase      ).vision_config
							elif vision_model_type == "clip_vision_model":
										from transformers import CLIPVisionConfig

										lowerCamelCase_ 		=     CLIPVisionConfig(**UpperCAmelCase      )
							else:
										lowerCamelCase_ 		=     AutoConfig.for_model(UpperCAmelCase       ,	**UpperCAmelCase      )

							lowerCamelCase_ 		=     projection_dim
							lowerCamelCase_ 		=     1.0




				@classmethod
				def 					UpperCAmelCase__	(							cls       ,	UpperCAmelCase       ,	UpperCAmelCase       ,	**UpperCAmelCase      ):
							return cls(text_config=text_config.to_dict()       ,	vision_config=vision_config.to_dict()       ,	**UpperCAmelCase      )





				def 					UpperCAmelCase__	(							self      ):
							lowerCamelCase_ 		=     copy.deepcopy(self.__dict__      )
							lowerCamelCase_ 		=     self.text_config.to_dict()
							lowerCamelCase_ 		=     self.vision_config.to_dict()
							lowerCamelCase_ 		=     self.__class__.model_type
							return output



