"""simple docstring"""
import warnings

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




class   __snake_case			(	snake_case__							):
      a__								=						["""image_processor""", """tokenizer"""]
      a__								=						"""VideoMAEImageProcessor"""
      a__								=						("""CLIPTokenizer""", """CLIPTokenizerFast""")



      def __init__(		self       ,     lowercase=None       ,     lowercase=None       ,     **lowercase)      ->     Any:





        '''simple docstring'''





        a__:	Union[str, Any]     				=      None
        if "feature_extractor" in kwargs:
          warnings.warn(
              'The `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor`'
              ' instead.'       ,     _SCREAMING_SNAKE_CASE       ,     )
          a__:	int     				=      kwargs.pop('feature_extractor')

        a__:	int     				=      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__(_SCREAMING_SNAKE_CASE       ,     _SCREAMING_SNAKE_CASE)
        a__:	Tuple     				=      self.image_processor



      def __call__(		self       ,     lowercase=None       ,     lowercase=None       ,     lowercase=None       ,     **lowercase)      ->     Optional[Any]:





        '''simple docstring'''





        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__:	List[str]     				=      self.tokenizer(_SCREAMING_SNAKE_CASE       ,     return_tensors=_SCREAMING_SNAKE_CASE       ,     **_SCREAMING_SNAKE_CASE)

        if videos is not None:
          a__:	Union[str, Any]     				=      self.image_processor(_SCREAMING_SNAKE_CASE       ,     return_tensors=_SCREAMING_SNAKE_CASE       ,     **_SCREAMING_SNAKE_CASE)

        if text is not None and videos is not None:
          a__:	Optional[Any]     				=      image_features.pixel_values
          return encoding
        elif text is not None:
          return encoding
        else:
          return BatchEncoding(data=dict(**_SCREAMING_SNAKE_CASE)       ,     tensor_type=_SCREAMING_SNAKE_CASE)



      def     lowerCamelCase_  (		self       ,     *lowercase       ,     **lowercase)      ->     Any:





        '''simple docstring'''





        return self.tokenizer.batch_decode(*_SCREAMING_SNAKE_CASE       ,     **_SCREAMING_SNAKE_CASE)



      def     lowerCamelCase_  (		self       ,     *lowercase       ,     **lowercase)      ->     str:





        '''simple docstring'''





        return self.tokenizer.decode(*_SCREAMING_SNAKE_CASE       ,     **_SCREAMING_SNAKE_CASE)



      @property
      def     lowerCamelCase_  (		self)      ->     int:





        '''simple docstring'''





        return ["input_ids", "attention_mask", "position_ids", "pixel_values"]



      @property
      def     lowerCamelCase_  (		self)      ->     Tuple:





        '''simple docstring'''





        warnings.warn(
            '`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead.'       ,     _SCREAMING_SNAKE_CASE       ,     )
        return self.image_processor_class



      @property
      def     lowerCamelCase_  (		self)      ->     Any:





        '''simple docstring'''





        warnings.warn(
            '`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead.'       ,     _SCREAMING_SNAKE_CASE       ,     )
        return self.image_processor










def   snake_case		(				UpperCAmelCase						:							set,    UpperCAmelCase						:							set ):
				assert isinstance(UpperCAmelCase,    UpperCAmelCase ), f'The input value of [set_a={set_a}] is not a set'
				assert isinstance(UpperCAmelCase,    UpperCAmelCase ), f'The input value of [set_b={set_b}] is not a set'

				return {a + b for a in set_a for b in set_b}


if __name__ == "__main__":
					from doctest import testmod

					testmod()





