


import copy

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


lowerCAmelCase__       :	int     				=logging.get_logger(__name__)







class      __lowercase  (__SCREAMING_SNAKE_CASE   ):





							"""simple docstring"""







							_UpperCAmelCase     =		"""hybrid-clip"""
							_UpperCAmelCase     =		True






							def __init__(	self       ,		lowerCAmelCase__=5_1_2       ,		**lowerCAmelCase__    ):





										"""simple docstring"""




										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`.'    )

										SCREAMING_SNAKE_CASE_						:			List[Any]       						= kwargs.pop('text_config'    )
										SCREAMING_SNAKE_CASE_						:			Optional[int]       						= kwargs.pop('vision_config'    )

										SCREAMING_SNAKE_CASE_						:			str       						= text_config.pop('model_type'    )
										SCREAMING_SNAKE_CASE_						:			List[str]       						= vision_config.pop('model_type'    )

										from transformers import AutoConfig

										SCREAMING_SNAKE_CASE_						:			Optional[int]       						= AutoConfig.for_model(UpperCamelCase__       ,		**UpperCamelCase__    )

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

													SCREAMING_SNAKE_CASE_						:			List[str]       						= CLIPVisionConfig(**UpperCamelCase__    )
										else:
													SCREAMING_SNAKE_CASE_						:			Optional[int]       						= AutoConfig.for_model(UpperCamelCase__       ,		**UpperCamelCase__    )

										SCREAMING_SNAKE_CASE_						:			Any       						= projection_dim
										SCREAMING_SNAKE_CASE_						:			Dict       						= 1.0






							@classmethod
							def  UpperCamelCase__			(	cls       ,		lowerCAmelCase__       ,		lowerCAmelCase__       ,		**lowerCAmelCase__    ):





										"""simple docstring"""




										return cls(text_config=text_config.to_dict()       ,		vision_config=vision_config.to_dict()       ,		**UpperCamelCase__    )






							def  UpperCamelCase__			(	self    ):





										"""simple docstring"""




										SCREAMING_SNAKE_CASE_						:			Optional[Any]       						= copy.deepcopy(self.__dict__    )
										SCREAMING_SNAKE_CASE_						:			int       						= self.text_config.to_dict()
										SCREAMING_SNAKE_CASE_						:			Dict       						= self.vision_config.to_dict()
										SCREAMING_SNAKE_CASE_						:			List[str]       						= self.__class__.model_type
										return output







'''simple docstring'''
from __future__ import annotations

import sys




def 					_UpperCamelCase		(    SCREAMING_SNAKE_CASE__      ,    SCREAMING_SNAKE_CASE__       )   ->				tuple[int, int]:


		'''simple docstring'''


		if abs(SCREAMING_SNAKE_CASE__       ) == 1:
				return a, 0
		elif abs(SCREAMING_SNAKE_CASE__       ) == 1:
				return 0, b

		snake_case       ,snake_case   :    Tuple			       =		a, b
		snake_case       ,snake_case   :    List[str]			       =		1, 0
		snake_case       ,snake_case   :    Optional[Any]			       =		0, 1

		while remainder != 0:
				snake_case   :    int			       =		old_remainder // remainder
				snake_case       ,snake_case   :    Tuple			       =		remainder, old_remainder - quotient * remainder
				snake_case       ,snake_case   :    Optional[Any]			       =		coeff_a, old_coeff_a - quotient * coeff_a
				snake_case       ,snake_case   :    Dict			       =		coeff_b, old_coeff_b - quotient * coeff_b

		# sign correction for negative numbers
		if a < 0:
				snake_case   :    Optional[Any]			       =		-old_coeff_a
		if b < 0:
				snake_case   :    int			       =		-old_coeff_b

		return old_coeff_a, old_coeff_b




def 					_UpperCamelCase		(    )   ->				str:


		'''simple docstring'''


		if len(sys.argv       ) < 3:
				print('''2 integer arguments required'''       )
				return 1
		snake_case   :    str			       =		int(sys.argv[1]       )
		snake_case   :    List[str]			       =		int(sys.argv[2]       )
		print(extended_euclidean_algorithm(SCREAMING_SNAKE_CASE__      ,    SCREAMING_SNAKE_CASE__       )       )
		return 0


if __name__ == "__main__":
						raise SystemExit(main())


