






"""simple docstring"""






from ...processing_utils import ProcessorMixin




class 							lowerCAmelCase__				(			UpperCAmelCase__ ):






      '''simple docstring'''

      __UpperCamelCase	 =  "WhisperFeatureExtractor"
      __UpperCamelCase	 =  "WhisperTokenizer"
      def __init__(						self     :  List[str]						,	lowercase_     :  List[Any]						,	lowercase_     :  Dict):




          '''simple docstring'''


          super().__init__(lowercase_						,	lowercase_)
          SCREAMING_SNAKE_CASE_      :  Optional[Any]    						=		self.feature_extractor
          SCREAMING_SNAKE_CASE_      :  Dict    						=		False
      def _SCREAMING_SNAKE_CASE (						self     :  int						,	lowercase_     :  str=None						,	lowercase_     :  Optional[Any]=None						,	lowercase_     :  Any=True):




          '''simple docstring'''


          return self.tokenizer.get_decoder_prompt_ids(task=lowercase_						,	language=lowercase_						,	no_timestamps=lowercase_)
      def __call__(						self     :  Dict						,	*lowercase_     :  Dict						,	**lowercase_     :  Union[str, Any]):




          '''simple docstring'''


          if self._in_target_context_manager:
              return self.current_processor(*lowercase_						,	**lowercase_)

          SCREAMING_SNAKE_CASE_      :  List[str]    						=		kwargs.pop('''audio'''						,	lowercase_)
          SCREAMING_SNAKE_CASE_      :  str    						=		kwargs.pop('''sampling_rate'''						,	lowercase_)
          SCREAMING_SNAKE_CASE_      :  Union[str, Any]    						=		kwargs.pop('''text'''						,	lowercase_)
          if len(lowercase_) > 0:
              SCREAMING_SNAKE_CASE_      :  Optional[int]    						=		args[0]
              SCREAMING_SNAKE_CASE_      :  Tuple    						=		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:
              SCREAMING_SNAKE_CASE_      :  Any    						=		self.feature_extractor(lowercase_						,	*lowercase_						,	sampling_rate=lowercase_						,	**lowercase_)
          if text is not None:
              SCREAMING_SNAKE_CASE_      :  Union[str, Any]    						=		self.tokenizer(lowercase_						,	**lowercase_)

          if text is None:
              return inputs

          elif audio is None:
              return encodings
          else:
              SCREAMING_SNAKE_CASE_      :  Union[str, Any]    						=		encodings['''input_ids''']
              return inputs
      def _SCREAMING_SNAKE_CASE (						self     :  List[str]						,	*lowercase_     :  Optional[Any]						,	**lowercase_     :  Tuple):




          '''simple docstring'''


          return self.tokenizer.batch_decode(*lowercase_						,	**lowercase_)
      def _SCREAMING_SNAKE_CASE (						self     :  Optional[int]						,	*lowercase_     :  Dict						,	**lowercase_     :  Optional[Any]):




          '''simple docstring'''


          return self.tokenizer.decode(*lowercase_						,	**lowercase_)



      def _SCREAMING_SNAKE_CASE (						self     :  Dict						,	lowercase_     :  str						,	lowercase_     :  Optional[Any]="np"):




          '''simple docstring'''


          return self.tokenizer.get_prompt_ids(lowercase_						,	return_tensors=lowercase_)







from __future__ import annotations

import bisect






def 				A				(					_lowerCamelCase				, _lowerCamelCase				, _lowerCamelCase = 0				, _lowerCamelCase = -1  ):





							'''simple docstring'''




							if hi < 0:
														_lowerCAmelCase     :							int    =    len(_lowerCamelCase  )

							while lo < hi:
														_lowerCAmelCase     :							Optional[Any]    =    lo + (hi - lo) // 2
														if sorted_collection[mid] < item:
																					_lowerCAmelCase     :							Union[str, Any]    =    mid + 1
														else:
																					_lowerCAmelCase     :							str    =    mid

							return lo






def 				A				(					_lowerCamelCase				, _lowerCamelCase				, _lowerCamelCase = 0				, _lowerCamelCase = -1  ):





							'''simple docstring'''




							if hi < 0:
														_lowerCAmelCase     :							str    =    len(_lowerCamelCase  )

							while lo < hi:
														_lowerCAmelCase     :							Tuple    =    lo + (hi - lo) // 2
														if sorted_collection[mid] <= item:
																					_lowerCAmelCase     :							Dict    =    mid + 1
														else:
																					_lowerCAmelCase     :							str    =    mid

							return lo






def 				A				(					_lowerCamelCase				, _lowerCamelCase				, _lowerCamelCase = 0				, _lowerCamelCase = -1  ):





							'''simple docstring'''




							sorted_collection.insert(bisect_left(_lowerCamelCase				, _lowerCamelCase				, _lowerCamelCase				, _lowerCamelCase  )				, _lowerCamelCase  )






def 				A				(					_lowerCamelCase				, _lowerCamelCase				, _lowerCamelCase = 0				, _lowerCamelCase = -1  ):





							'''simple docstring'''




							sorted_collection.insert(bisect_right(_lowerCamelCase				, _lowerCamelCase				, _lowerCamelCase				, _lowerCamelCase  )				, _lowerCamelCase  )






def 				A				(					_lowerCamelCase				, _lowerCamelCase  ):





							'''simple docstring'''




							_lowerCAmelCase     :							int    =    0
							_lowerCAmelCase     :							Union[str, Any]    =    len(_lowerCamelCase  ) - 1

							while left <= right:
														_lowerCAmelCase     :							int    =    left + (right - left) // 2
														_lowerCAmelCase     :							int    =    sorted_collection[midpoint]
														if current_item == item:
																					return midpoint
														elif item < current_item:
																					_lowerCAmelCase     :							str    =    midpoint - 1
														else:
																					_lowerCAmelCase     :							Any    =    midpoint + 1
							return None






def 				A				(					_lowerCamelCase				, _lowerCamelCase  ):





							'''simple docstring'''




							_lowerCAmelCase     :							Tuple    =    bisect.bisect_left(_lowerCamelCase				, _lowerCamelCase  )
							if index != len(_lowerCamelCase  ) and sorted_collection[index] == item:
														return index
							return None






def 				A				(					_lowerCamelCase				, _lowerCamelCase				, _lowerCamelCase				, _lowerCamelCase  ):





							'''simple docstring'''




							if right < left:
														return None

							_lowerCAmelCase     :							Optional[int]    =    left + (right - left) // 2

							if sorted_collection[midpoint] == item:
														return midpoint
							elif sorted_collection[midpoint] > item:
														return binary_search_by_recursion(_lowerCamelCase				, _lowerCamelCase				, _lowerCamelCase				, midpoint - 1  )
							else:
														return binary_search_by_recursion(_lowerCamelCase				, _lowerCamelCase				, midpoint + 1				, _lowerCamelCase  )


if __name__ == "__main__":
						_snake_case		=  input("Enter numbers separated by comma:\n").strip()
						_snake_case		=  sorted(int(item) for item in user_input.split(","))
						_snake_case		=  int(input("Enter a single number to be found in the list:\n"))
						_snake_case		=  binary_search(collection, target)
						if result is None:
												print(f'''{target} was not found in {collection}.''')
						else:
												print(f'''{target} was found at position {result} in {collection}.''')
