



'''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


snake_case_				:			Optional[Any]						 =						logging.get_logger(__name__)






class 							lowercase__			(							lowercase     ):
	lowercase__						       =    """vision-text-dual-encoder"""
	lowercase__						       =    True





	def __init__(				self      :       List[Any]				,lowerCamelCase__      :       Optional[Any]=512				,lowerCamelCase__      :       Tuple=2.6_5_9_2				,**lowerCamelCase__      :       Optional[Any]				):







							'''simple docstring'''
							super().__init__(**lowerCamelCase__				)

							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      :	Any				       =     kwargs.pop('vision_config'				)
							_UpperCamelCase      :	int				       =     kwargs.pop('text_config'				)

							_UpperCamelCase      :	int				       =     vision_config.pop('model_type'				)
							_UpperCamelCase      :	Optional[Any]				       =     text_config.pop('model_type'				)

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

							_UpperCamelCase      :	Dict				       =     AutoConfig.for_model(lowerCamelCase__				,**lowerCamelCase__				)

							_UpperCamelCase      :	List[str]				       =     projection_dim
							_UpperCamelCase      :	Union[str, Any]				       =     logit_scale_init_value





	@classmethod
	def 			UpperCamelCase_						(				cls      :       Optional[int]				,lowerCamelCase__      :       PretrainedConfig				,lowerCamelCase__      :       PretrainedConfig				,**lowerCamelCase__      :       List[str]				):







							'''simple docstring'''
							return cls(vision_config=vision_config.to_dict()				,text_config=text_config.to_dict()				,**lowerCamelCase__				)





	def 			UpperCamelCase_						(				self      :       Optional[Any]				):







							'''simple docstring'''
							_UpperCamelCase      :	Dict				       =     copy.deepcopy(self.__dict__				)
							_UpperCamelCase      :	Optional[Any]				       =     self.vision_config.to_dict()
							_UpperCamelCase      :	int				       =     self.text_config.to_dict()
							_UpperCamelCase      :	Tuple				       =     self.__class__.model_type
							return output







'''simple docstring'''
import math






def A__					(  UpperCAmelCase_							):

						if 1 < number < 4:
												# 2 and 3 are primes
												return True
						elif number < 2 or number % 2 == 0 or number % 3 == 0:
												# Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
												return False

						# All primes number are in format of 6k +/- 1
						for i in range(5						,						int(math.sqrt(UpperCAmelCase_							) + 1							)						,						6							):
												if number % i == 0 or number % (i + 2) == 0:
																		return False
						return True






def A__					(  UpperCAmelCase_ = 1_0_0_0						,						UpperCAmelCase_ = 1_0_0_0							):
						_UpperCamelCase      :	str				       =     [0, 0, 0]  # length, a, b
						for a in range((a_limit * -1) + 1						,						UpperCAmelCase_							):
												for b in range(2						,						UpperCAmelCase_							):
																		if is_prime(UpperCAmelCase_							):
																								_UpperCamelCase      :	List[str]				       =     0
																								_UpperCamelCase      :	Union[str, Any]				       =     0
																								while is_prime((n**2) + (a * n) + b							):
																														count += 1
																														n += 1
																								if count > longest[0]:
																														_UpperCamelCase      :	Any				       =     [count, a, b]
						_UpperCamelCase      :	Dict				       =     longest[1] * longest[2]
						return ans


if __name__ == "__main__":
					print(solution(1000, 1000))


