

"""simple docstring"""




import warnings

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







class      __lowercase			(    __lowerCamelCase					):

  '''simple docstring'''





  snake_case_				       =       ["""image_processor""", """tokenizer"""]
  snake_case_				       =       """CLIPImageProcessor"""
  snake_case_				       =       ("""CLIPTokenizer""", """CLIPTokenizerFast""")

  def __init__(  self		:			Tuple					,A		:			Union[str, Any]=None					,A		:			Union[str, Any]=None					,**A		:			List[Any]    ):






   '''simple docstring'''
   UpperCAmelCase__					:  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."""					,A					,)
    UpperCAmelCase__					:  str					   =					kwargs.pop("""feature_extractor"""    )

   UpperCAmelCase__					:  Tuple					   =					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    )

  def __call__(  self		:			str					,A		:			Any=None					,A		:			Dict=None					,A		:			List[str]=None					,**A		:			List[Any]    ):






   '''simple docstring'''

   if text is None and images is None:
    raise ValueError("""You have to specify either text or images. Both cannot be none."""    )

   if text is not None:
    UpperCAmelCase__					:  Union[str, Any]					   =					self.tokenizer(A					,return_tensors=A					,**A    )

   if images is not None:
    UpperCAmelCase__					:  Optional[int]					   =					self.image_processor(A					,return_tensors=A					,**A    )

   if text is not None and images is not None:
    UpperCAmelCase__					:  Any					   =					image_features.pixel_values
    return encoding
   elif text is not None:
    return encoding
   else:
    return BatchEncoding(data=dict(**A    )					,tensor_type=A    )

  def    __lowercase       (  self		:			Optional[int]					,*A		:			List[str]					,**A		:			int    ):






   '''simple docstring'''
   return self.tokenizer.batch_decode(*A					,**A    )

  def    __lowercase       (  self		:			List[str]					,*A		:			Tuple					,**A		:			Union[str, Any]    ):






   '''simple docstring'''
   return self.tokenizer.decode(*A					,**A    )

  @property
  def    __lowercase       (  self		:			List[Any]    ):






   '''simple docstring'''
   UpperCAmelCase__					:  int					   =					self.tokenizer.model_input_names
   UpperCAmelCase__					:  Optional[int]					   =					self.image_processor.model_input_names
   return list(dict.fromkeys(tokenizer_input_names + image_processor_input_names    )    )

  @property
  def    __lowercase       (  self		:			Dict    ):






   '''simple docstring'''
   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    __lowercase       (  self		:			str    ):






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








"""simple docstring"""




def   lowerCAmelCase						(					__UpperCamelCase = 1000      ):
 '''simple docstring'''





 return sum(2 * a * ((a - 1) // 2) for a in range(3							,    n + 1      )      )


if __name__ == "__main__":
      print(solution())





