"""simple docstring"""


def 			lowerCamelCase_ (					__lowerCAmelCase				)							->					str:




						'''simple docstring'''



						if not isinstance(__lowerCAmelCase   ,    __lowerCAmelCase				):
												lowerCamelCase__					=(
												    "operation can not be conducted on a object of type "
												    F'''{type(__lowerCAmelCase				).__name__}'''
												)
												raise TypeError(__lowerCAmelCase				)
						lowerCamelCase__					=""
						for _ in range(0   ,    32				):
												bit_string += str(number % 2				)
												lowerCamelCase__					=number >> 1
						return bit_string





def 			lowerCamelCase_ (					__lowerCAmelCase				)							->					str:




						'''simple docstring'''



						if number < 0:
												raise ValueError("the value of input must be positive"				)
						elif isinstance(__lowerCAmelCase   ,    __lowerCAmelCase				):
												raise TypeError("Input value must be a 'int' type"				)
						elif isinstance(__lowerCAmelCase   ,    __lowerCAmelCase				):
												raise TypeError("'<' not supported between instances of 'str' and 'int'"				)
						lowerCamelCase__					=0
						# iterator over [1 to 32],since we are dealing with 32 bit integer
						for _ in range(1   ,    33				):
												# left shift the bits by unity
												lowerCamelCase__					=result << 1
												# get the end bit
												lowerCamelCase__					=number % 2
												# right shift the bits by unity
												lowerCamelCase__					=number >> 1
												# add that bit to our ans
												lowerCamelCase__					=result | end_bit
						return get_reverse_bit_string(__lowerCAmelCase				)


if __name__ == "__main__":
	import doctest

	doctest.testmod()



"""simple docstring"""


import copy

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


a							=logging.get_logger(__name__)






class    __UpperCAmelCase						(	__lowerCAmelCase	):
				A__      :   Any  							=       '''hybrid-clip'''
				A__      :   Optional[Any]  							=       True

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

										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(_lowerCamelCase	, **_lowerCamelCase      )

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

																lowerCamelCase__					=CLIPVisionConfig(**_lowerCamelCase      )
										else:
																lowerCamelCase__					=AutoConfig.for_model(_lowerCamelCase	, **_lowerCamelCase      )

										lowerCamelCase__					=projection_dim
										lowerCamelCase__					=1.0

				@classmethod
				def 		_a	(      cls	, _lowerCamelCase	, _lowerCamelCase	, **_lowerCamelCase      ):
										return cls(text_config=text_config.to_dict()	, vision_config=vision_config.to_dict()	, **_lowerCamelCase      )






				def 		_a	(      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


