'''simple docstring'''




import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..auto.configuration_auto import AutoConfig
from ..clip.configuration_clip import CLIPVisionConfig


__SCREAMING_SNAKE_CASE	:					Tuple					=  logging.get_logger(__name__)

class      lowerCamelCase_     (lowerCAmelCase__   ):
						'''simple docstring'''

						__UpperCamelCase:  int      =						"vision-text-dual-encoder"
						__UpperCamelCase:  str      =						True




						def __init__(	self						:    int						, A						:    int=512						, A						:    Tuple=2.6_592						, **A						:    Any	):
													super().__init__(**_UpperCAmelCase	)

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

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

													_UpperCAmelCase					:  Union[str, Any]											=   kwargs.pop("vision_config"	)
													_UpperCAmelCase					:  str											=   kwargs.pop("text_config"	)

													_UpperCAmelCase					:  Dict											=   vision_config.pop("model_type"	)
													_UpperCAmelCase					:  List[str]											=   text_config.pop("model_type"	)

													if vision_model_type == "clip":
																				_UpperCAmelCase					:  int											=   AutoConfig.for_model(_UpperCAmelCase						, **_UpperCAmelCase	).vision_config
													elif vision_model_type == "clip_vision_model":
																				_UpperCAmelCase					:  Dict											=   CLIPVisionConfig(**_UpperCAmelCase	)
													else:
																				_UpperCAmelCase					:  Optional[Any]											=   AutoConfig.for_model(_UpperCAmelCase						, **_UpperCAmelCase	)

													_UpperCAmelCase					:  Any											=   AutoConfig.for_model(_UpperCAmelCase						, **_UpperCAmelCase	)

													_UpperCAmelCase					:  Optional[Any]											=   projection_dim
													_UpperCAmelCase					:  Union[str, Any]											=   logit_scale_init_value




						@classmethod
						def 					_A     (	cls						:    Tuple						, A						:    PretrainedConfig						, A						:    PretrainedConfig						, **A						:    Optional[Any]	):
													return cls(vision_config=vision_config.to_dict()						, text_config=text_config.to_dict()						, **_UpperCAmelCase	)





						def 					_A     (	self						:    int	):
													_UpperCAmelCase					:  List[str]											=   copy.deepcopy(self.__dict__	)
													_UpperCAmelCase					:  List[Any]											=   self.vision_config.to_dict()
													_UpperCAmelCase					:  List[Any]											=   self.text_config.to_dict()
													_UpperCAmelCase					:  Any											=   self.__class__.model_type
													return output


'''simple docstring'''




def      UpperCamelCase_							( _UpperCAmelCase  :				Optional[int]      ,     _UpperCAmelCase  :				List[Any]   )   ->   List[str]:


       """simple docstring"""







       if len(str(_UpperCAmelCase   )   ) == 1 or len(str(_UpperCAmelCase   )   ) == 1:
              return a * b

       _UpperCAmelCase					:  Any											=   max(len(str(_UpperCAmelCase   )   )      ,     len(str(_UpperCAmelCase   )   )   )
       _UpperCAmelCase					:  Any											=   ma // 2

       _UpperCAmelCase				,  _UpperCAmelCase					:  Union[str, Any]											=   divmod(_UpperCAmelCase      ,     10**ma   )
       _UpperCAmelCase				,  _UpperCAmelCase					:  int											=   divmod(_UpperCAmelCase      ,     10**ma   )

       _UpperCAmelCase					:  List[str]											=   karatsuba(_UpperCAmelCase      ,     _UpperCAmelCase   )
       _UpperCAmelCase					:  int											=   karatsuba((aa + aa)      ,     (ba + ba)   )
       _UpperCAmelCase					:  Any											=   karatsuba(_UpperCAmelCase      ,     _UpperCAmelCase   )

       return (z * 10 ** (2 * ma)) + ((y - z - x) * 10 ** (ma)) + (x)

def      UpperCamelCase_							( )   ->   List[str]:


       """simple docstring"""







       print(karatsuba(15_463      ,     23_489   )   )


if __name__ == "__main__":
  main()

