



'''simple docstring'''


from ...processing_utils import ProcessorMixin







class 	UpperCAmelCase	(		__a):


 '''simple docstring'''




 __magic_name__					: Union[str, Any]  =      ["image_processor", "feature_extractor"]
 __magic_name__					: List[Any]  =      "TvltImageProcessor"
 __magic_name__					: Optional[int]  =      "TvltFeatureExtractor"




 def __init__(   self							,  lowerCAmelCase_							,  lowerCAmelCase_) ->      List[Any]:



      """simple docstring"""







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

      a_       		=image_processor
      a_       		=feature_extractor




 def __call__(   self							,  lowerCAmelCase_=None							,  lowerCAmelCase_=None							,  lowerCAmelCase_=None							,  lowerCAmelCase_=None							,  lowerCAmelCase_=False							,  lowerCAmelCase_=False							,  *lowerCAmelCase_							,  **lowerCAmelCase_							,  ) ->      str:



      """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(lowerCAmelCase_							,  mask_pixel=lowerCAmelCase_							,  *lowerCAmelCase_							,  **lowerCAmelCase_)
      if images_mixed is not None:
           a_       		=self.image_processor(lowerCAmelCase_							,  is_mixed=lowerCAmelCase_							,  *lowerCAmelCase_							,  **lowerCAmelCase_)
      if audio is not None:
           a_       		=self.feature_extractor(
               lowerCAmelCase_							,  *lowerCAmelCase_							,  sampling_rate=lowerCAmelCase_							,  mask_audio=lowerCAmelCase_							,  **lowerCAmelCase_)

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




 @property
 def       lowercase_  (   self) ->      Optional[int]:



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


from __future__ import annotations






def  UpperCAmelCase_       (		lowercase__       ,	lowercase__       ):


     '''simple docstring'''







     if b == 0:
          return (1, 0)
     ((a_)		,						(a_))       		=extended_euclid(lowercase__       ,	a % b       )
     a_       		=a // b
     return (y, x - k * y)






def  UpperCAmelCase_       (		lowercase__       ,	lowercase__       ,	lowercase__       ,	lowercase__       ):


     '''simple docstring'''







     ((a_)		,						(a_))       		=extended_euclid(lowercase__       ,	lowercase__       )
     a_       		=na * na
     a_       		=ra * x * na + ra * y * na
     return (n % m + m) % m






def  UpperCAmelCase_       (		lowercase__       ,	lowercase__       ):


     '''simple docstring'''







     ((a_)		,						(a_))       		=extended_euclid(lowercase__       ,	lowercase__       )
     if b < 0:
          a_       		=(b % n + n) % n
     return b






def  UpperCAmelCase_       (		lowercase__       ,	lowercase__       ,	lowercase__       ,	lowercase__       ):


     '''simple docstring'''







     a_		,						a_       		=invert_modulo(lowercase__       ,	lowercase__       ), invert_modulo(lowercase__       ,	lowercase__       )
     a_       		=na * na
     a_       		=ra * x * na + ra * y * na
     return (n % m + m) % m


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

  testmod(name='''chinese_remainder_theorem''', verbose=True)
  testmod(name='''chinese_remainder_theorem2''', verbose=True)
  testmod(name='''invert_modulo''', verbose=True)
  testmod(name='''extended_euclid''', verbose=True)


