



'''simple docstring'''






import warnings

from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding



class 				lowercase			(    _lowerCamelCase							):


 """simple docstring"""


 UpperCAmelCase		      =    ["""image_processor""", """tokenizer"""]
 UpperCAmelCase		      =    """VideoMAEImageProcessor"""
 UpperCAmelCase		      =    ("""CLIPTokenizer""", """CLIPTokenizerFast""")







 def __init__(				self    ,a_=None    ,a_=None    ,**a_				)						->  int:
        _UpperCAmelCase    :		int     	=					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    :		Tuple     	=					kwargs.pop("""feature_extractor"""				)

        _UpperCAmelCase    :		str     	=					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    :		Tuple     	=					self.image_processor







 def __call__(				self    ,a_=None    ,a_=None    ,a_=None    ,**a_				)						->  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    :		Union[str, Any]     	=					self.tokenizer(a_    ,return_tensors=a_    ,**a_				)

        if videos is not None:
               _UpperCAmelCase    :		Optional[Any]     	=					self.image_processor(a_    ,return_tensors=a_    ,**a_				)

        if text is not None and videos is not None:
               _UpperCAmelCase    :		Union[str, Any]     	=					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    ,*a_    ,**a_				)						->  Optional[int]:
        return self.tokenizer.batch_decode(*a_    ,**a_				)







 def _snake_case					(				self    ,*a_    ,**a_				)						->  Optional[Any]:
        return self.tokenizer.decode(*a_    ,**a_				)







 @property
 def _snake_case					(				self				)						->  Tuple:
        return ["input_ids", "attention_mask", "position_ids", "pixel_values"]







 @property
 def _snake_case					(				self				)						->  Tuple:
        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				)						->  Dict:
        warnings.warn(
            """`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead."""    ,a_    ,)
        return self.image_processor







def 	_lowerCamelCase  (		A_  :	Union[str, Any]							,  A_  :	Optional[int]      )			->			Dict:

   '''simple docstring'''






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

   UpperCamelCase__ :			Any 						=max(len(str(A_      )      )							,  len(str(A_      )      )      )
   UpperCamelCase__ :			Optional[int] 						=ma // 2

   UpperCamelCase__						,	UpperCamelCase__ :			Dict 						=divmod(A_							,  1_0**ma      )
   UpperCamelCase__						,	UpperCamelCase__ :			Union[str, Any] 						=divmod(A_							,  1_0**ma      )

   UpperCamelCase__ :			List[Any] 						=karatsuba(A_							,  A_      )
   UpperCamelCase__ :			Dict 						=karatsuba((aa + aa)							,  (ba + ba)      )
   UpperCamelCase__ :			Optional[int] 						=karatsuba(A_							,  A_      )

   return (z * 1_0 ** (2 * ma)) + ((y - z - x) * 1_0 ** (ma)) + (x)
def 	_lowerCamelCase  (		)			->			Any:

   '''simple docstring'''






   print(karatsuba(1_5_4_6_3							,  2_3_4_8_9      )      )


if __name__ == "__main__":
     main()

