




"""simple docstring"""
from graphs.minimum_spanning_tree_kruskal import kruskal





def 						UpperCAmelCase				(			)  ->     List[Any]:
			__lowerCamelCase					:	List[str]	       =				9
			__lowerCamelCase					:	int	       =				[
			    [0, 1, 4],
			    [0, 7, 8],
			    [1, 2, 8],
			    [7, 8, 7],
			    [7, 6, 1],
			    [2, 8, 2],
			    [8, 6, 6],
			    [2, 3, 7],
			    [2, 5, 4],
			    [6, 5, 2],
			    [3, 5, 14],
			    [3, 4, 9],
			    [5, 4, 10],
			    [1, 7, 11],
			]

			__lowerCamelCase					:	Dict	       =				kruskal(A__							,				A__     )

			__lowerCamelCase					:	List[Any]	       =				[
			    [7, 6, 1],
			    [2, 8, 2],
			    [6, 5, 2],
			    [0, 1, 4],
			    [2, 5, 4],
			    [2, 3, 7],
			    [0, 7, 8],
			    [3, 4, 9],
			]

			assert sorted(A__     ) == sorted(A__     )









"""simple docstring"""
import warnings
from contextlib import contextmanager

from ...processing_utils import ProcessorMixin

class __lowercase(      lowercase__				):




					'''simple docstring'''


					__a						:						List[str]     		= 'Speech2TextFeatureExtractor'
					__a						:						Optional[int]     		= 'Speech2TextTokenizer'
					def __init__(    self						,	__a						,	__a     ):
								super().__init__(__a						,	__a     )
								__lowerCamelCase					:	Union[str, Any]	       =				self.feature_extractor
								__lowerCamelCase					:	List[str]	       =				False
					def __call__(    self						,	*__a						,	**__a     ):
								# For backward compatibility
								if self._in_target_context_manager:
											return self.current_processor(*__a						,	**__a     )

								if "raw_speech" in kwargs:
											warnings.warn('Using `raw_speech` as a keyword argument is deprecated. Use `audio` instead.'     )
											__lowerCamelCase					:	str	       =				kwargs.pop('raw_speech'     )
								else:
											__lowerCamelCase					:	Optional[Any]	       =				kwargs.pop('audio'						,	__a     )
								__lowerCamelCase					:	Optional[Any]	       =				kwargs.pop('sampling_rate'						,	__a     )
								__lowerCamelCase					:	Optional[int]	       =				kwargs.pop('text'						,	__a     )
								if len(__a     ) > 0:
											__lowerCamelCase					:	Optional[int]	       =				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					:	Dict	       =				self.feature_extractor(__a						,	*__a						,	sampling_rate=__a						,	**__a     )
								if text is not None:
											__lowerCamelCase					:	Optional[int]	       =				self.tokenizer(__a						,	**__a     )

								if text is None:
											return inputs
								elif audio is None:
											return encodings
								else:
											__lowerCamelCase					:	Any	       =				encodings['input_ids']
											return inputs
					def     snake_case_				(    self						,	*__a						,	**__a     ):
								return self.tokenizer.batch_decode(*__a						,	**__a     )
					def     snake_case_				(    self						,	*__a						,	**__a     ):
								return self.tokenizer.decode(*__a						,	**__a     )





					@contextmanager
					def     snake_case_				(    self     ):
								warnings.warn(
								    '`as_target_processor` is deprecated and will be removed in v5 of Transformers. You can process your '
								    'labels by using the argument `text` of the regular `__call__` method (either in the same call as '
								    'your audio inputs, or in a separate call.'     )
								__lowerCamelCase					:	int	       =				True
								__lowerCamelCase					:	Union[str, Any]	       =				self.tokenizer
								yield
								__lowerCamelCase					:	Tuple	       =				self.feature_extractor
								__lowerCamelCase					:	List[str]	       =				False



