




'''simple docstring'''


from ...processing_utils import ProcessorMixin

class      A       (						_a       ):
							lowercase_							     =							'WhisperFeatureExtractor'
							lowercase_							     =							'WhisperTokenizer'







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


														"""simple docstring"""


														super().__init__(lowerCAmelCase_				,     lowerCAmelCase_   )
														_a      	=							self.feature_extractor
														_a      	=							False







							def   __lowerCAmelCase     (    self			:    Any				,     lowerCAmelCase_			:    Optional[Any]=None				,     lowerCAmelCase_			:    str=None				,     lowerCAmelCase_			:    Dict=True   )     ->				List[Any]:


														"""simple docstring"""


														return self.tokenizer.get_decoder_prompt_ids(task=lowerCAmelCase_				,     language=lowerCAmelCase_				,     no_timestamps=lowerCAmelCase_   )







							def __call__(    self			:    Any				,     *lowerCAmelCase_			:    List[Any]				,     **lowerCAmelCase_			:    List[str]   )     ->				Dict:


														"""simple docstring"""


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

														_a      	=							kwargs.pop('''audio'''				,     lowerCAmelCase_   )
														_a      	=							kwargs.pop('''sampling_rate'''				,     lowerCAmelCase_   )
														_a      	=							kwargs.pop('''text'''				,     lowerCAmelCase_   )
														if len(lowerCAmelCase_   ) > 0:
																					_a      	=							args[0]
																					_a      	=							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:
																					_a      	=							self.feature_extractor(lowerCAmelCase_				,     *lowerCAmelCase_				,     sampling_rate=lowerCAmelCase_				,     **lowerCAmelCase_   )
														if text is not None:
																					_a      	=							self.tokenizer(lowerCAmelCase_				,     **lowerCAmelCase_   )

														if text is None:
																					return inputs

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







							def   __lowerCAmelCase     (    self			:    str				,     *lowerCAmelCase_			:    Dict				,     **lowerCAmelCase_			:    int   )     ->				Any:


														"""simple docstring"""


														return self.tokenizer.batch_decode(*lowerCAmelCase_				,     **lowerCAmelCase_   )







							def   __lowerCAmelCase     (    self			:    Dict				,     *lowerCAmelCase_			:    Tuple				,     **lowerCAmelCase_			:    Optional[Any]   )     ->				Union[str, Any]:


														"""simple docstring"""


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







							def   __lowerCAmelCase     (    self			:    Optional[int]				,     lowerCAmelCase_			:    str				,     lowerCAmelCase_			:    str="np"   )     ->				Dict:


														"""simple docstring"""


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







'''simple docstring'''


from __future__ import annotations

from collections import deque
from collections.abc import Iterator
from dataclasses import dataclass

@dataclass
class      A       :
							lowercase_							     =							42
							lowercase_							     =							42



class      A       :







							def __init__(    self			:    Optional[Any]				,     lowerCAmelCase_			:    int   )     ->				str:


														"""simple docstring"""


														_a      	=							[[] for _ in range(lowerCAmelCase_   )]
														_a      	=							size







							def __getitem__(    self			:    Any				,     lowerCAmelCase_			:    int   )     ->				Iterator[Edge]:


														"""simple docstring"""


														return iter(self._graph[vertex]   )







							@property
							def   __lowerCAmelCase     (    self			:    str   )     ->				Tuple:


														"""simple docstring"""


														return self._size







							def   __lowerCAmelCase     (    self			:    Union[str, Any]				,     lowerCAmelCase_			:    int				,     lowerCAmelCase_			:    int				,     lowerCAmelCase_			:    int   )     ->				Dict:


														"""simple docstring"""


														if weight not in (0, 1):
																					raise ValueError('''Edge weight must be either 0 or 1.'''   )

														if to_vertex < 0 or to_vertex >= self.size:
																					raise ValueError('''Vertex indexes must be in [0; size).'''   )

														self._graph[from_vertex].append(Edge(lowerCAmelCase_				,     lowerCAmelCase_   )   )







							def   __lowerCAmelCase     (    self			:    Tuple				,     lowerCAmelCase_			:    int				,     lowerCAmelCase_			:    int   )     ->				int | None:


														"""simple docstring"""


														_a      	=							deque([start_vertex]   )
														_a      	=							[None] * self.size
														_a      	=							0

														while queue:
																					_a      	=							queue.popleft()
																					_a      	=							distances[current_vertex]
																					if current_distance is None:
																												continue

																					for edge in self[current_vertex]:
																												_a      	=							current_distance + edge.weight
																												_a      	=							distances[edge.destination_vertex]
																												if (
																												    isinstance(lowerCAmelCase_				,     lowerCAmelCase_   )
																												    and new_distance >= dest_vertex_distance
																												):
																																			continue
																												_a      	=							new_distance
																												if edge.weight == 0:
																																			queue.appendleft(edge.destination_vertex   )
																												else:
																																			queue.append(edge.destination_vertex   )

														if distances[finish_vertex] is None:
																					raise ValueError('''No path from start_vertex to finish_vertex.'''   )

														return distances[finish_vertex]


if __name__ == "__main__":
				import doctest

				doctest.testmod()

