






from __future__ import annotations

import sys



def      _SCREAMING_SNAKE_CASE  (	__lowercase				:     int     ,			__lowercase				:     str      )  -> int:





       """simple docstring"""

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

       __A             =		a, b
       __A             =		1, 0
       __A             =		0, 1

       while remainder != 0:
              __A             =		old_remainder // remainder
              __A             =		remainder, old_remainder - quotient * remainder
              __A             =		coeff_a, old_coeff_a - quotient * coeff_a
              __A             =		coeff_b, old_coeff_b - quotient * coeff_b

       # sign correction for negative numbers
       if a < 0:
              __A             =		-old_coeff_a
       if b < 0:
              __A             =		-old_coeff_b

       return old_coeff_a, old_coeff_b



def      _SCREAMING_SNAKE_CASE  (	)  -> List[Any]:





       """simple docstring"""

       if len(sys.argv      ) < 3:
              print("""2 integer arguments required"""      )
              return 1
       __A             =		int(sys.argv[1]      )
       __A             =		int(sys.argv[2]      )
       print(extended_euclidean_algorithm(__lowercase     ,			__lowercase      )      )
       return 0


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












import copy

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


__a :    Tuple								=				logging.get_logger(__name__)


class  __lowercase (		lowercase_					):







     '''simple docstring'''
     SCREAMING_SNAKE_CASE				  =			"hybrid-clip"
     SCREAMING_SNAKE_CASE				  =			True




     def __init__(			self    :     Optional[Any]	,		UpperCamelCase_    :     Optional[Any]=512	,		**UpperCamelCase_    :     List[Any]			):


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

         __A             =		kwargs.pop("""text_config"""			)
         __A             =		kwargs.pop("""vision_config"""			)

         __A             =		text_config.pop("""model_type"""			)
         __A             =		vision_config.pop("""model_type"""			)

         from transformers import AutoConfig

         __A             =		AutoConfig.for_model(UpperCamelCase_	,		**UpperCamelCase_			)

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

             __A             =		CLIPVisionConfig(**UpperCamelCase_			)
         else:
             __A             =		AutoConfig.for_model(UpperCamelCase_	,		**UpperCamelCase_			)

         __A             =		projection_dim
         __A             =		1.0




     @classmethod
     def 						lowerCAmelCase_       (			cls    :     int	,		UpperCamelCase_    :     PretrainedConfig	,		UpperCamelCase_    :     PretrainedConfig	,		**UpperCamelCase_    :     Union[str, Any]			):


         """simple docstring"""



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





     def 						lowerCAmelCase_       (			self    :     Tuple			):


         """simple docstring"""



         __A             =		copy.deepcopy(self.__dict__			)
         __A             =		self.text_config.to_dict()
         __A             =		self.vision_config.to_dict()
         __A             =		self.__class__.model_type
         return output




