
'''simple docstring'''






from ...processing_utils import ProcessorMixin

class 			UpperCAmelCase__    (							A			):
    lowerCAmelCase_					     =		'WhisperFeatureExtractor'
    lowerCAmelCase_					     =		'WhisperTokenizer'



    def __init__(						self   :							List[str],__A   :							Tuple,__A   :							Any  ):
          super().__init__(__A,__A  )
          _lowerCamelCase					: List[str]		    = self.feature_extractor
          _lowerCamelCase					: List[str]		    = False



    def 	lowerCamelCase_	(						self   :							List[Any],__A   :							Optional[Any]=None,__A   :							str=None,__A   :							Tuple=True  ):
          return self.tokenizer.get_decoder_prompt_ids(task=__A,language=__A,no_timestamps=__A  )



    def __call__(						self   :							Union[str, Any],*__A   :							List[str],**__A   :							Any  ):
          # For backward compatibility
          if self._in_target_context_manager:
                return self.current_processor(*__A,**__A  )

          _lowerCamelCase					: Dict		    = kwargs.pop("audio",__A  )
          _lowerCamelCase					: List[Any]		    = kwargs.pop("sampling_rate",__A  )
          _lowerCamelCase					: Optional[Any]		    = kwargs.pop("text",__A  )
          if len(__A  ) > 0:
                _lowerCamelCase					: Dict		    = args[0]
                _lowerCamelCase					: str		    = args[1:]

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

          if audio is not None:
                _lowerCamelCase					: Any		    = self.feature_extractor(__A,*__A,sampling_rate=__A,**__A  )
          if text is not None:
                _lowerCamelCase					: Any		    = self.tokenizer(__A,**__A  )

          if text is None:
                return inputs

          elif audio is None:
                return encodings
          else:
                _lowerCamelCase					: int		    = encodings["input_ids"]
                return inputs



    def 	lowerCamelCase_	(						self   :							Any,*__A   :							List[Any],**__A   :							Tuple  ):
          return self.tokenizer.batch_decode(*__A,**__A  )



    def 	lowerCamelCase_	(						self   :							List[str],*__A   :							Optional[Any],**__A   :							Optional[int]  ):
          return self.tokenizer.decode(*__A,**__A  )



    def 	lowerCamelCase_	(						self   :							Optional[Any],__A   :							str,__A   :							List[str]="np"  ):
          return self.tokenizer.get_prompt_ids(__A,return_tensors=__A  )




def 		a__      (		_UpperCamelCase      :			list[int]				):
   if not numbers:
      return 0

   if not isinstance(_UpperCamelCase			,(list, tuple)				) or not all(
       isinstance(_UpperCamelCase			,_UpperCamelCase				) for number in numbers				):
      raise ValueError('''numbers must be an iterable of integers'''				)

   __lowerCamelCase    				=     __lowerCamelCase    				=     __lowerCamelCase    				=     numbers[0]

   for i in range(1			,len(_UpperCamelCase				)				):
      # update the maximum and minimum subarray products
      __lowerCamelCase    				=     numbers[i]
      if number < 0:
         __lowerCamelCase				,__lowerCamelCase    				=     min_till_now, max_till_now
      __lowerCamelCase    				=     max(_UpperCamelCase			,max_till_now * number				)
      __lowerCamelCase    				=     min(_UpperCamelCase			,min_till_now * number				)

      # update the maximum product found till now
      __lowerCamelCase    				=     max(_UpperCamelCase			,_UpperCamelCase				)

   return max_prod






