






import warnings

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







class       UpperCAmelCase_						( lowercase			):



      """simple docstring"""
      UpperCamelCase_    : List[str]									=['image_processor', 'tokenizer']
      UpperCamelCase_    : List[Any]									='VideoMAEImageProcessor'
      UpperCamelCase_    : Tuple									=('CLIPTokenizer', 'CLIPTokenizerFast')
      def __init__(    self   ,    SCREAMING_SNAKE_CASE_=None   ,    SCREAMING_SNAKE_CASE_=None   ,    **SCREAMING_SNAKE_CASE_			)    ->				List[Any]:
          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.'''   ,    SCREAMING_SNAKE_CASE_   ,    )
              UpperCamelCase	:Dict     							=       kwargs.pop('''feature_extractor'''			)

          UpperCamelCase	:List[Any]     							=       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_			)
          UpperCamelCase	:Any     							=       self.image_processor
      def __call__(    self   ,    SCREAMING_SNAKE_CASE_=None   ,    SCREAMING_SNAKE_CASE_=None   ,    SCREAMING_SNAKE_CASE_=None   ,    **SCREAMING_SNAKE_CASE_			)    ->				Tuple:

          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	:Optional[Any]     							=       self.tokenizer(SCREAMING_SNAKE_CASE_   ,    return_tensors=SCREAMING_SNAKE_CASE_   ,    **SCREAMING_SNAKE_CASE_			)

          if videos is not None:
              UpperCamelCase	:Tuple     							=       self.image_processor(SCREAMING_SNAKE_CASE_   ,    return_tensors=SCREAMING_SNAKE_CASE_   ,    **SCREAMING_SNAKE_CASE_			)

          if text is not None and videos is not None:
              UpperCamelCase	:List[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    UpperCAmelCase						(    self   ,    *SCREAMING_SNAKE_CASE_   ,    **SCREAMING_SNAKE_CASE_			)    ->				List[Any]:
          return self.tokenizer.batch_decode(*SCREAMING_SNAKE_CASE_   ,    **SCREAMING_SNAKE_CASE_			)
      def    UpperCAmelCase						(    self   ,    *SCREAMING_SNAKE_CASE_   ,    **SCREAMING_SNAKE_CASE_			)    ->				List[str]:
          return self.tokenizer.decode(*SCREAMING_SNAKE_CASE_   ,    **SCREAMING_SNAKE_CASE_			)
      @property
      def    UpperCAmelCase						(    self			)    ->				List[Any]:
          return ["input_ids", "attention_mask", "position_ids", "pixel_values"]
      @property
      def    UpperCAmelCase						(    self			)    ->				Optional[int]:
          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    UpperCAmelCase						(    self			)    ->				List[Any]:
          warnings.warn(
              '''`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead.'''   ,    SCREAMING_SNAKE_CASE_   ,    )
          return self.image_processor













def   _A       (    SCREAMING_SNAKE_CASE__  :     int = 998001	):

    # fetches the next number
    for number in range(n - 1					,  9999					,  -1	):
        UpperCamelCase	:Union[str, Any]     							=       str(SCREAMING_SNAKE_CASE__	)

        # checks whether 'str_number' is a palindrome.
        if str_number == str_number[::-1]:
            UpperCamelCase	:Dict     							=       999

            # if 'number' is a product of two 3-digit numbers
            # then number is the answer otherwise fetch next number.
            while divisor != 99:
                if (number % divisor == 0) and (len(str(number // divisor	)	) == 3.0):
                    return number
                divisor -= 1
    raise ValueError('''That number is larger than our acceptable range.'''	)


if __name__ == "__main__":
 print(f'''{solution() = }''')





