





import warnings

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







class     lowerCamelCase(	__snake_case  ):
     '''simple docstring'''


     __magic_name__        = ['image_processor', 'tokenizer']
     __magic_name__        = 'VideoMAEImageProcessor'
     __magic_name__        = ('CLIPTokenizer', 'CLIPTokenizerFast')




     def __init__(						self							,    snake_case_=None							,    snake_case_=None							,    **snake_case_       ):
         _A    =       None
         if "feature_extractor" in kwargs:
             warnings.warn(
                 'The `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor`'
                 ' instead.'							,    snake_case_							,    )
             _A    =       kwargs.pop('feature_extractor'       )

         _A    =       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__(snake_case_							,    snake_case_       )
         _A    =       self.image_processor




     def __call__(						self							,    snake_case_=None							,    snake_case_=None							,    snake_case_=None							,    **snake_case_       ):

         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:
             _A    =       self.tokenizer(snake_case_							,    return_tensors=snake_case_							,    **snake_case_       )

         if videos is not None:
             _A    =       self.image_processor(snake_case_							,    return_tensors=snake_case_							,    **snake_case_       )

         if text is not None and videos is not None:
             _A    =       image_features.pixel_values
             return encoding
         elif text is not None:
             return encoding
         else:
             return BatchEncoding(data=dict(**snake_case_       )							,    tensor_type=snake_case_       )




     def 					lowerCAmelCase__		(						self							,    *snake_case_							,    **snake_case_       ):
         return self.tokenizer.batch_decode(*snake_case_							,    **snake_case_       )




     def 					lowerCAmelCase__		(						self							,    *snake_case_							,    **snake_case_       ):
         return self.tokenizer.decode(*snake_case_							,    **snake_case_       )




     @property
     def 					lowerCAmelCase__		(						self       ):
         return ["input_ids", "attention_mask", "position_ids", "pixel_values"]




     @property
     def 					lowerCAmelCase__		(						self       ):
         warnings.warn(
             '`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead.'							,    snake_case_							,    )
         return self.image_processor_class




     @property
     def 					lowerCAmelCase__		(						self       ):
         warnings.warn(
             '`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead.'							,    snake_case_							,    )
         return self.image_processor












from ..utils import DummyObject, requires_backends


__A       : str						    = None





def 							__lowerCAmelCase(					*_SCREAMING_SNAKE_CASE       ,    **_SCREAMING_SNAKE_CASE							)       ->   Tuple:




    """simple docstring"""




    requires_backends(_SCREAMING_SNAKE_CASE       ,    ['sentencepiece', 'tokenizers']							)





