






import copy

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


__lowerCamelCase						= logging.get_logger(__name__)

class      UpperCamelCase_							(				UpperCamelCase       ):
						lowercase									=  '''hybrid-clip'''
						lowercase									=  True




						def __init__(    self		,	lowercase=512		,	**lowercase       )			->						List[str]:
													super().__init__(**__SCREAMING_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`.'''       )

													_a  :    List[str]			=						kwargs.pop('''text_config'''       )
													_a  :    Union[str, Any]			=						kwargs.pop('''vision_config'''       )

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

													from transformers import AutoConfig

													_a  :    Any			=						AutoConfig.for_model(__SCREAMING_SNAKE_CASE		,	**__SCREAMING_SNAKE_CASE       )

													if vision_model_type == "clip":
																				_a  :    List[Any]			=						AutoConfig.for_model(__SCREAMING_SNAKE_CASE		,	**__SCREAMING_SNAKE_CASE       ).vision_config
													elif vision_model_type == "clip_vision_model":
																				from transformers import CLIPVisionConfig

																				_a  :    Union[str, Any]			=						CLIPVisionConfig(**__SCREAMING_SNAKE_CASE       )
													else:
																				_a  :    Any			=						AutoConfig.for_model(__SCREAMING_SNAKE_CASE		,	**__SCREAMING_SNAKE_CASE       )

													_a  :    Union[str, Any]			=						projection_dim
													_a  :    str			=						1.0




						@classmethod
						def      snake_case__(    cls		,	lowercase		,	lowercase		,	**lowercase       )			->						Optional[int]:
													return cls(text_config=text_config.to_dict()		,	vision_config=vision_config.to_dict()		,	**__SCREAMING_SNAKE_CASE       )







						def      snake_case__(    self       )			->						Optional[Any]:
													_a  :    Union[str, Any]			=						copy.deepcopy(self.__dict__       )
													_a  :    Union[str, Any]			=						self.text_config.to_dict()
													_a  :    Tuple			=						self.vision_config.to_dict()
													_a  :    Dict			=						self.__class__.model_type
													return output

'''simple docstring'''

def        SCREAMING_SNAKE_CASE_  (	snake_case_				:	int							)       ->	int:
 if number != int(snake_case_							):
  raise ValueError('factorial() only accepts integral values'							)
 if number < 0:
  raise ValueError('factorial() not defined for negative values'							)
 SCREAMING_SNAKE_CASE  :  str								=		1
 for i in range(1   ,     number + 1							):
  value *= i
 return value



def        SCREAMING_SNAKE_CASE_  (	snake_case_				:	int							)       ->	int:
 if not isinstance(snake_case_   ,     snake_case_							):
  raise ValueError('factorial() only accepts integral values'							)
 if n < 0:
  raise ValueError('factorial() not defined for negative values'							)
 return 1 if n == 0 or n == 1 else n * factorial(n - 1							)


if __name__ == "__main__":
   import doctest

   doctest.testmod()

   __UpperCAmelCase												=   int(input('Enter a positive integer: ').strip() or 0)
   print(f"""factorial{n} is {factorial(n)}""")


