code: 
  
  
  
  
  
  
  import copy
  
  from transformers.configuration_utils import PretrainedConfig
  from transformers.utils import logging
  
  
  UpperCamelCase_	:    List[Any]  					=       logging.get_logger(__name__)
  
  
  
  
  class      __lowercase	(	__snake_case					):
  	_A   			=      "hybrid-clip"
  	_A   			=      True
  
  
  
  
  
  
  	def __init__(self							:   Optional[int]			,  snake_case							:   List[str]=512			,  **snake_case							:   List[Any]						)   -> List[Any]:
  							super().__init__(**snake_case						)
  
  							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`."						)
  
  							_lowercase					:  int    			=      kwargs.pop("text_config"						)
  							_lowercase					:  Optional[int]    			=      kwargs.pop("vision_config"						)
  
  							_lowercase					:  Any    			=      text_config.pop("model_type"						)
  							_lowercase					:  Any    			=      vision_config.pop("model_type"						)
  
  							from transformers import AutoConfig
  
  							_lowercase					:  Optional[Any]    			=      AutoConfig.for_model(snake_case			,  **snake_case						)
  
  							if vision_model_type == "clip":
  													_lowercase					:  str    			=      AutoConfig.for_model(snake_case			,  **snake_case						).vision_config
  							elif vision_model_type == "clip_vision_model":
  													from transformers import CLIPVisionConfig
  
  													_lowercase					:  List[Any]    			=      CLIPVisionConfig(**snake_case						)
  							else:
  													_lowercase					:  List[Any]    			=      AutoConfig.for_model(snake_case			,  **snake_case						)
  
  							_lowercase					:  Union[str, Any]    			=      projection_dim
  							_lowercase					:  Optional[Any]    			=      1.0
  
  
  
  
  
  
  	@classmethod
  	def 			_a(cls							:   Union[str, Any]			,  snake_case							:   PretrainedConfig			,  snake_case							:   PretrainedConfig			,  **snake_case							:   Union[str, Any]						)   -> List[str]:
  							return cls(text_config=text_config.to_dict()			,  vision_config=vision_config.to_dict()			,  **snake_case						)
  
  
  
  
  
  
  	def 			_a(self							:   Union[str, Any]						)   -> Optional[Any]:
  							_lowercase					:  List[str]    			=      copy.deepcopy(self.__dict__						)
  							_lowercase					:  List[Any]    			=      self.text_config.to_dict()
  							_lowercase					:  str    			=      self.vision_config.to_dict()
  							_lowercase					:  int    			=      self.__class__.model_type
  							return output
  
  
  
  
  
style_context: 
  import math
  
  
  
  def 		UpperCamelCase    (					_UpperCAmelCase     :      int     )      -> list:
  
  
  
  
  
  
  						'''simple docstring'''
  
  						if n <= 0:
  												raise ValueError("Only positive integers have prime factors"     )
  						_lowercase					:  Optional[int]    			=      []
  						while n % 2 == 0:
  												pf.append(2     )
  												_lowercase					:  Tuple    			=      int(n / 2     )
  						for i in range(3   , int(math.sqrt(_UpperCAmelCase     )     ) + 1   , 2     ):
  												while n % i == 0:
  																		pf.append(_UpperCAmelCase     )
  																		_lowercase					:  Optional[int]    			=      int(n / i     )
  						if n > 2:
  												pf.append(_UpperCAmelCase     )
  						return pf
  
  
  
  def 		UpperCamelCase    (					_UpperCAmelCase     :      int     )      -> int:
  
  
  
  
  
  
  						'''simple docstring'''
  
  						if n <= 0:
  												raise ValueError("Only positive numbers are accepted"     )
  						_lowercase					:  str    			=      1
  						_lowercase					:  Tuple    			=      1
  						while n % 2 == 0:
  												temp += 1
  												_lowercase					:  List[Any]    			=      int(n / 2     )
  						div *= temp
  						for i in range(3   , int(math.sqrt(_UpperCAmelCase     )     ) + 1   , 2     ):
  												_lowercase					:  Optional[Any]    			=      1
  												while n % i == 0:
  																		temp += 1
  																		_lowercase					:  Optional[Any]    			=      int(n / i     )
  												div *= temp
  						if n > 1:
  												div *= 2
  						return div
  
  
  
  def 		UpperCamelCase    (					_UpperCAmelCase     :      int     )      -> int:
  
  
  
  
  
  
  						'''simple docstring'''
  
  						if n <= 0:
  												raise ValueError("Only positive numbers are accepted"     )
  						_lowercase					:  int    			=      1
  						_lowercase					:  List[str]    			=      1
  						while n % 2 == 0:
  												temp += 1
  												_lowercase					:  str    			=      int(n / 2     )
  						if temp > 1:
  												s *= (2**temp - 1) / (2 - 1)
  						for i in range(3   , int(math.sqrt(_UpperCAmelCase     )     ) + 1   , 2     ):
  												_lowercase					:  int    			=      1
  												while n % i == 0:
  																		temp += 1
  																		_lowercase					:  List[Any]    			=      int(n / i     )
  												if temp > 1:
  																		s *= (i**temp - 1) / (i - 1)
  						return int(_UpperCAmelCase     )
  
  
  
  def 		UpperCamelCase    (					_UpperCAmelCase     :      int     )      -> int:
  
  
  
  
  
  
  						'''simple docstring'''
  
  						_lowercase					:  int    			=      n
  						for x in set(prime_factors(_UpperCAmelCase     )     ):
  												s *= (x - 1) / x
  						return int(_UpperCAmelCase     )
  
  
  if __name__ == "__main__":
  							import doctest
  
  							doctest.testmod()
  
  
  
  
  