code: 
  
  
  
  
  
  import warnings
  
  from ...processing_utils import ProcessorMixin
  from ...tokenization_utils_base import BatchEncoding
  
  
  
  
  class   _UpperCAmelCase	(   lowercase__					):
       __A          =   ["""image_processor""", """tokenizer"""]
       __A          =   """VideoMAEImageProcessor"""
       __A          =   ("""CLIPTokenizer""", """CLIPTokenizerFast""")
  
  
  
  
       def __init__(						self    ,      __lowerCAmelCase=None    ,      __lowerCAmelCase=None    ,      **__lowerCAmelCase       )						->  int:
         UpperCamelCase__         =	None
         if "feature_extractor" in kwargs:
           warnings.warn(
               """The `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor`"""
               """ instead."""    ,      _A    ,      )
           UpperCamelCase__         =	kwargs.pop("""feature_extractor"""       )
  
         UpperCamelCase__         =	image_processor if image_processor is not None else feature_extractor
         if image_processor is None:
           raise ValueError("""You need to specify an `image_processor`."""       )
         if tokenizer is None:
           raise ValueError("""You need to specify a `tokenizer`."""       )
  
         super().__init__(_A    ,      _A       )
         UpperCamelCase__         =	self.image_processor
  
  
  
  
       def __call__(						self    ,      __lowerCAmelCase=None    ,      __lowerCAmelCase=None    ,      __lowerCAmelCase=None    ,      **__lowerCAmelCase       )						->  str:
  
         if text is None and videos is None:
           raise ValueError("""You have to specify either text or videos. Both cannot be none."""       )
  
         if text is not None:
           UpperCamelCase__         =	self.tokenizer(_A    ,      return_tensors=_A    ,      **_A       )
  
         if videos is not None:
           UpperCamelCase__         =	self.image_processor(_A    ,      return_tensors=_A    ,      **_A       )
  
         if text is not None and videos is not None:
           UpperCamelCase__         =	image_features.pixel_values
           return encoding
         elif text is not None:
           return encoding
         else:
           return BatchEncoding(data=dict(**_A       )    ,      tensor_type=_A       )
  
  
  
  
       def 	snake_case_		(						self    ,      *__lowerCAmelCase    ,      **__lowerCAmelCase       )						->  int:
         return self.tokenizer.batch_decode(*_A    ,      **_A       )
  
  
  
  
       def 	snake_case_		(						self    ,      *__lowerCAmelCase    ,      **__lowerCAmelCase       )						->  Dict:
         return self.tokenizer.decode(*_A    ,      **_A       )
  
  
  
  
       @property
       def 	snake_case_		(						self       )						->  Any:
         return ["input_ids", "attention_mask", "position_ids", "pixel_values"]
  
  
  
  
       @property
       def 	snake_case_		(						self       )						->  Optional[Any]:
         warnings.warn(
             """`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead."""    ,      _A    ,      )
         return self.image_processor_class
  
  
  
  
       @property
       def 	snake_case_		(						self       )						->  Optional[Any]:
         warnings.warn(
             """`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead."""    ,      _A    ,      )
         return self.image_processor
  
  
  
  
  
  
style_context: 
  
  
  
  
  
  __lowerCAmelCase     =			{
      "0": 1,
      "1": 1,
      "2": 2,
      "3": 6,
      "4": 24,
      "5": 120,
      "6": 720,
      "7": 5_040,
      "8": 40_320,
      "9": 362_880,
  }
  
  __lowerCAmelCase     =			{145: 145}
  
  __lowerCAmelCase     =			{
      145: 0,
      169: 3,
      36_301: 3,
      1_454: 3,
      871: 2,
      45_361: 2,
      872: 2,
  }
  
  def     a						(      _lowercase   :     int       )     ->int:
  		if n in CACHE_SUM_DIGIT_FACTORIALS:
  				return CACHE_SUM_DIGIT_FACTORIALS[n]
  		UpperCamelCase__         =	sum(DIGIT_FACTORIALS[let] for let in str(_lowercase       )       )
  		UpperCamelCase__         =	ret
  		return ret
  
  def     a						(      _lowercase   :     int ,						_lowercase   :     set | None = None       )     ->int:
  		UpperCamelCase__         =	previous or set()
  		if n in CHAIN_LENGTH_CACHE:
  				return CHAIN_LENGTH_CACHE[n]
  		UpperCamelCase__         =	sum_digit_factorials(_lowercase       )
  		if next_number in previous:
  				UpperCamelCase__         =	0
  				return 0
  		else:
  				previous.add(_lowercase       )
  				UpperCamelCase__         =	1 + chain_length(_lowercase ,						_lowercase       )
  				UpperCamelCase__         =	ret
  				return ret
  
  def     a						(      _lowercase   :     int = 6_0 ,						_lowercase   :     int = 1_0_0_0_0_0_0       )     ->int:
  		return sum(1 for i in range(1 ,						_lowercase       ) if chain_length(_lowercase       ) == num_terms       )
  
  
  if __name__ == "__main__":
  				print(f"""{solution() = }""")
  
  
  
  
  
  