


"""simple docstring"""





from ...processing_utils import ProcessorMixin



class 		snake_case_(       _UpperCamelCase			):
     __UpperCamelCase  =					'''WhisperFeatureExtractor'''
     __UpperCamelCase  =					'''WhisperTokenizer'''






     def __init__(	self  :					List[str]					,				UpperCamelCase_  :					List[str]					,				UpperCamelCase_  :					Optional[Any]				):
           super().__init__(_UpperCAmelCase					,				_UpperCAmelCase				)
           lowerCAmelCase					:	Dict       =   self.feature_extractor
           lowerCAmelCase					:	Optional[Any]       =   False






     def      lowerCamelCase__     (	self  :					List[Any]					,				UpperCamelCase_  :					Optional[int]=None					,				UpperCamelCase_  :					int=None					,				UpperCamelCase_  :					Dict=True				):
           return self.tokenizer.get_decoder_prompt_ids(task=_UpperCAmelCase					,				language=_UpperCAmelCase					,				no_timestamps=_UpperCAmelCase				)






     def __call__(	self  :					str					,				*UpperCamelCase_  :					str					,				**UpperCamelCase_  :					Optional[Any]				):
           # For backward compatibility
           if self._in_target_context_manager:
                 return self.current_processor(*_UpperCAmelCase					,				**_UpperCAmelCase				)

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

           if text is None:
                 return inputs

           elif audio is None:
                 return encodings
           else:
                 lowerCAmelCase					:	str       =   encodings['''input_ids''']
                 return inputs






     def      lowerCamelCase__     (	self  :					Optional[Any]					,				*UpperCamelCase_  :					Dict					,				**UpperCamelCase_  :					Optional[int]				):
           return self.tokenizer.batch_decode(*_UpperCAmelCase					,				**_UpperCAmelCase				)






     def      lowerCamelCase__     (	self  :					Optional[int]					,				*UpperCamelCase_  :					List[Any]					,				**UpperCamelCase_  :					List[Any]				):
           return self.tokenizer.decode(*_UpperCAmelCase					,				**_UpperCAmelCase				)






     def      lowerCamelCase__     (	self  :					Tuple					,				UpperCamelCase_  :					Optional[Any]					,				UpperCamelCase_  :					Optional[int]="np"				):
           return self.tokenizer.get_prompt_ids(_UpperCAmelCase					,				return_tensors=_UpperCAmelCase				)






"""simple docstring"""





# using dfs for finding eulerian path traversal


def      _snake_case						(						_snake_case				:			Optional[Any] ,   _snake_case				:			List[Any] ,   _snake_case				:			str ,   _snake_case				:			List[Any]=None			):
      lowerCAmelCase					:	Any       =   (path or []) + [u]
      for v in graph[u]:
            if visited_edge[u][v] is False:
                  lowerCAmelCase,      lowerCAmelCase					:	Union[str, Any]       =   True, True
                  lowerCAmelCase					:	int       =   dfs(_snake_case ,   _snake_case ,   _snake_case ,   _snake_case			)
      return path


def      _snake_case						(						_snake_case				:			Optional[int] ,   _snake_case				:			Dict			):
      lowerCAmelCase					:	Tuple       =   0
      lowerCAmelCase					:	Optional[Any]       =   -1
      for i in range(_snake_case			):
            if i not in graph.keys():
                  continue
            if len(graph[i]			) % 2 == 1:
                  odd_degree_nodes += 1
                  lowerCAmelCase					:	Optional[Any]       =   i
      if odd_degree_nodes == 0:
            return 1, odd_node
      if odd_degree_nodes == 2:
            return 2, odd_node
      return 3, odd_node


def      _snake_case						(						_snake_case				:			Tuple ,   _snake_case				:			List[Any]			):
      lowerCAmelCase					:	Any       =   [[False for _ in range(max_node + 1			)] for _ in range(max_node + 1			)]
      lowerCAmelCase,      lowerCAmelCase					:	Optional[int]       =   check_circuit_or_path(_snake_case ,   _snake_case			)
      if check == 3:
            print('''graph is not Eulerian'''			)
            print('''no path'''			)
            return
      lowerCAmelCase					:	Dict       =   1
      if check == 2:
            lowerCAmelCase					:	int       =   odd_node
            print('''graph has a Euler path'''			)
      if check == 1:
            print('''graph has a Euler cycle'''			)
      lowerCAmelCase					:	List[str]       =   dfs(_snake_case ,   _snake_case ,   _snake_case			)
      print(_snake_case			)


def      _snake_case						(						):
      lowerCAmelCase					:	Optional[Any]       =   {1: [2, 3, 4], 2: [1, 3], 3: [1, 2], 4: [1, 5], 5: [4]}
      lowerCAmelCase					:	Union[str, Any]       =   {1: [2, 3, 4, 5], 2: [1, 3], 3: [1, 2], 4: [1, 5], 5: [1, 4]}
      lowerCAmelCase					:	List[Any]       =   {1: [2, 3, 4], 2: [1, 3, 4], 3: [1, 2], 4: [1, 2, 5], 5: [4]}
      lowerCAmelCase					:	Optional[Any]       =   {1: [2, 3], 2: [1, 3], 3: [1, 2]}
      lowerCAmelCase					:	Any       =   {
          1: [],
          2: []
          # all degree is zero
      }
      lowerCAmelCase					:	List[str]       =   10
      check_euler(_snake_case ,   _snake_case			)
      check_euler(_snake_case ,   _snake_case			)
      check_euler(_snake_case ,   _snake_case			)
      check_euler(_snake_case ,   _snake_case			)
      check_euler(_snake_case ,   _snake_case			)


if __name__ == "__main__":
 main()


