


'''simple docstring'''







import enum
import shutil
import sys


SCREAMING_SNAKE_CASE_      ,     SCREAMING_SNAKE_CASE_      =			shutil.get_terminal_size()

SCREAMING_SNAKE_CASE_      =			{'UP': 'A', 'DOWN': 'B', 'RIGHT': 'C', 'LEFT': 'D'}


class  lowerCAmelCase_						(       enum.Enum      ):





  """simple docstring"""



  a_       :List[Any]												=0
  a_       :Optional[Any]												=1




def        __lowercase						(      __SCREAMING_SNAKE_CASE				,  __SCREAMING_SNAKE_CASE=""		)				->					List[Any]:
     """simple docstring"""




     sys.stdout.write(str(__SCREAMING_SNAKE_CASE		) + end		)
     sys.stdout.flush()




def        __lowercase						(      __SCREAMING_SNAKE_CASE				,  __SCREAMING_SNAKE_CASE				,  __SCREAMING_SNAKE_CASE=""		)				->					Tuple:
     """simple docstring"""




     forceWrite(F'''\u001b[{color}m{content}\u001b[0m'''				,  __SCREAMING_SNAKE_CASE		)




def        __lowercase						(      )				->					Union[str, Any]:
     """simple docstring"""




     forceWrite("""\r"""		)




def        __lowercase						(      __SCREAMING_SNAKE_CASE				,  __SCREAMING_SNAKE_CASE		)				->					str:
     """simple docstring"""




     forceWrite(F'''\033[{num_lines}{CURSOR_TO_CHAR[direction.upper()]}'''		)




def        __lowercase						(      )				->					int:
     """simple docstring"""




     forceWrite(""" """ * TERMINAL_WIDTH		)
     reset_cursor()




def        __lowercase						(      )				->					str:
     """simple docstring"""




     reset_cursor()
     forceWrite("""-""" * TERMINAL_WIDTH		)










'''simple docstring'''







from ...processing_utils import ProcessorMixin


class  lowerCAmelCase_						(       snake_case__      ):





  """simple docstring"""



  a_       :Dict												=["""image_processor""", """feature_extractor"""]
  a_       :str												="""TvltImageProcessor"""
  a_       :str												="""TvltFeatureExtractor"""

  def __init__(					self     :							Dict				,							SCREAMING_SNAKE_CASE__     :							Optional[Any]				,							SCREAMING_SNAKE_CASE__     :							Union[str, Any]						):





       '''simple docstring'''

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

       __a       =   image_processor
       __a       =   feature_extractor

  def __call__(					self     :							Union[str, Any]				,							SCREAMING_SNAKE_CASE__     :							str=None				,							SCREAMING_SNAKE_CASE__     :							Optional[Any]=None				,							SCREAMING_SNAKE_CASE__     :							Tuple=None				,							SCREAMING_SNAKE_CASE__     :							List[Any]=None				,							SCREAMING_SNAKE_CASE__     :							Any=False				,							SCREAMING_SNAKE_CASE__     :							List[str]=False				,							*SCREAMING_SNAKE_CASE__     :							str				,							**SCREAMING_SNAKE_CASE__     :							Optional[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(SCREAMING_SNAKE_CASE__				,							mask_pixel=SCREAMING_SNAKE_CASE__				,							*SCREAMING_SNAKE_CASE__				,							**SCREAMING_SNAKE_CASE__						)
       if images_mixed is not None:
            __a       =   self.image_processor(SCREAMING_SNAKE_CASE__				,							is_mixed=SCREAMING_SNAKE_CASE__				,							*SCREAMING_SNAKE_CASE__				,							**SCREAMING_SNAKE_CASE__						)
       if audio is not None:
            __a       =   self.feature_extractor(
                SCREAMING_SNAKE_CASE__				,							*SCREAMING_SNAKE_CASE__				,							sampling_rate=SCREAMING_SNAKE_CASE__				,							mask_audio=SCREAMING_SNAKE_CASE__				,							**SCREAMING_SNAKE_CASE__						)

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


  @property
  def __a						(					self     :							List[str]						):





       '''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						)						)






