




"""simple docstring"""



from ...processing_utils import ProcessorMixin




class      UpperCAmelCase_  (						A_							):
    lowercase__						 =				['''image_processor''', '''feature_extractor''']
    lowercase__						 =				'''TvltImageProcessor'''
    lowercase__						 =				'''TvltFeatureExtractor'''




    def __init__(   self						:	Dict     ,			snake_case_						:	Union[str, Any]     ,			snake_case_						:	Optional[int]				)				->							str:




     '''simple docstring'''

     super().__init__(image_processor=snake_case_     ,			feature_extractor=snake_case_				)

     A__	=    image_processor
     A__	=    feature_extractor




    def __call__(   self						:	int     ,			snake_case_						:	Tuple=None     ,			snake_case_						:	List[str]=None     ,			snake_case_						:	Optional[int]=None     ,			snake_case_						:	str=None     ,			snake_case_						:	Union[str, Any]=False     ,			snake_case_						:	List[Any]=False     ,			*snake_case_						:	int     ,			**snake_case_						:	Any     ,			)				->							int:




     '''simple docstring'''

     if images is None and audio is None:
      raise ValueError("You need to specify either an `images` or `audio` input to process."				)

     A__	=    None
     if images is not None:
      A__	=    self.image_processor(snake_case_     ,			mask_pixel=snake_case_     ,			*snake_case_     ,			**snake_case_				)
     if images_mixed is not None:
      A__	=    self.image_processor(snake_case_     ,			is_mixed=snake_case_     ,			*snake_case_     ,			**snake_case_				)
     if audio is not None:
      A__	=    self.feature_extractor(
          snake_case_     ,			*snake_case_     ,			sampling_rate=snake_case_     ,			mask_audio=snake_case_     ,			**snake_case_				)

     A__	=    {}
     if audio is not None:
      output_dict.update(snake_case_				)
     if images is not None:
      output_dict.update(snake_case_				)
     if images_mixed_dict is not None:
      output_dict.update(snake_case_				)
     return output_dict




    @property
    def 							__magic_name__							(   self						:	Union[str, Any]				)				->							Tuple:




     '''simple docstring'''

     A__	=    self.image_processor.model_input_names
     A__	=    self.feature_extractor.model_input_names
     return list(dict.fromkeys(image_processor_input_names + feature_extractor_input_names				)				)











"""simple docstring"""



import baseaa







def   _SCREAMING_SNAKE_CASE       (							lowercase_						)						->		bytes:
 return baseaa.aaaencode(string.encode("utf-8"						)						)







def   _SCREAMING_SNAKE_CASE       (							lowercase_						)						->		str:
 return baseaa.aaadecode(lowercase_						).decode("utf-8"						)


if __name__ == "__main__":
      import doctest

      doctest.testmod()





