
class 			_lowerCAmelCase      :




				def __init__(      self  )       ->   Tuple:
							lowerCAmelCase_      			=			0
							lowerCAmelCase_      			=			0
							lowerCAmelCase_      			=			{}




				def   __a		(      self       ,       _UpperCamelCase  )       ->   Dict:
							if vertex not in self.adjacency:
										lowerCAmelCase_      			=			{}
										self.num_vertices += 1




				def   __a		(      self       ,       _UpperCamelCase       ,       _UpperCamelCase       ,       _UpperCamelCase  )       ->   Optional[Any]:
							self.add_vertex(_UpperCamelCase  )
							self.add_vertex(_UpperCamelCase  )

							if head == tail:
										return

							lowerCAmelCase_      			=			weight
							lowerCAmelCase_      			=			weight




				def   __a		(      self  )       ->   Union[str, Any]:
							lowerCAmelCase_      			=			self.get_edges()
							for edge in edges:
										lowerCAmelCase_			,						lowerCAmelCase_			,						lowerCAmelCase_      			=			edge
										edges.remove((tail, head, weight)  )
							for i in range(len(_UpperCamelCase  )  ):
										lowerCAmelCase_      			=			list(edges[i]  )

							edges.sort(key=lambda _UpperCamelCase  : e[2]  )
							for i in range(len(_UpperCamelCase  ) - 1  ):
										if edges[i][2] >= edges[i + 1][2]:
													lowerCAmelCase_      			=			edges[i][2] + 1
							for edge in edges:
										lowerCAmelCase_			,						lowerCAmelCase_			,						lowerCAmelCase_      			=			edge
										lowerCAmelCase_      			=			weight
										lowerCAmelCase_      			=			weight




				def __str__(      self  )       ->   Any:
							lowerCAmelCase_      			=			""
							for tail in self.adjacency:
										for head in self.adjacency[tail]:
													lowerCAmelCase_      			=			self.adjacency[head][tail]
													string += f"""{head} -> {tail} == {weight}\n"""
							return string.rstrip("\n"  )




				def   __a		(      self  )       ->   int:
							lowerCAmelCase_      			=			[]
							for tail in self.adjacency:
										for head in self.adjacency[tail]:
													output.append((tail, head, self.adjacency[head][tail])  )
							return output




				def   __a		(      self  )       ->   str:
							return self.adjacency.keys()




				@staticmethod
				def   __a		(      _UpperCamelCase=None       ,       _UpperCamelCase=None  )       ->   List[Any]:
							lowerCAmelCase_      			=			Graph()
							if vertices is None:
										lowerCAmelCase_      			=			[]
							if edges is None:
										lowerCAmelCase_      			=			[]
							for vertex in vertices:
										g.add_vertex(_UpperCamelCase  )
							for edge in edges:
										g.add_edge(*_UpperCamelCase  )
							return g





				class 			_lowerCAmelCase      :




								def __init__(      self  )       ->   Dict:
											lowerCAmelCase_      			=			{}
											lowerCAmelCase_      			=			{}




								def __len__(      self  )       ->   Union[str, Any]:
											return len(self.parent  )




								def   __a		(      self       ,       _UpperCamelCase  )       ->   int:
											if item in self.parent:
														return self.find(_UpperCamelCase  )

											lowerCAmelCase_      			=			item
											lowerCAmelCase_      			=			0
											return item




								def   __a		(      self       ,       _UpperCamelCase  )       ->   int:
											if item not in self.parent:
														return self.make_set(_UpperCamelCase  )
											if item != self.parent[item]:
														lowerCAmelCase_      			=			self.find(self.parent[item]  )
											return self.parent[item]




								def   __a		(      self       ,       _UpperCamelCase       ,       _UpperCamelCase  )       ->   Dict:
											lowerCAmelCase_      			=			self.find(_UpperCamelCase  )
											lowerCAmelCase_      			=			self.find(_UpperCamelCase  )

											if roota == roota:
														return roota

											if self.rank[roota] > self.rank[roota]:
														lowerCAmelCase_      			=			roota
														return roota

											if self.rank[roota] < self.rank[roota]:
														lowerCAmelCase_      			=			roota
														return roota

											if self.rank[roota] == self.rank[roota]:
														self.rank[roota] += 1
														lowerCAmelCase_      			=			roota
														return roota
											return None




				@staticmethod
				def   __a		(      _UpperCamelCase  )       ->   Optional[Any]:
							lowerCAmelCase_      			=			graph.num_vertices

							lowerCAmelCase_      			=			Graph.UnionFind()
							lowerCAmelCase_      			=			[]
							while num_components > 1:
										lowerCAmelCase_      			=			{}
										for vertex in graph.get_vertices():
													lowerCAmelCase_      			=			-1

										lowerCAmelCase_      			=			graph.get_edges()
										for edge in edges:
													lowerCAmelCase_			,						lowerCAmelCase_			,						lowerCAmelCase_      			=			edge
													edges.remove((tail, head, weight)  )
										for edge in edges:
													lowerCAmelCase_			,						lowerCAmelCase_			,						lowerCAmelCase_      			=			edge
													lowerCAmelCase_      			=			union_find.find(_UpperCamelCase  )
													lowerCAmelCase_      			=			union_find.find(_UpperCamelCase  )
													if seta != seta:
																if cheap_edge[seta] == -1 or cheap_edge[seta][2] > weight:
																			lowerCAmelCase_      			=			[head, tail, weight]

																if cheap_edge[seta] == -1 or cheap_edge[seta][2] > weight:
																			lowerCAmelCase_      			=			[head, tail, weight]
										for vertex in cheap_edge:
													if cheap_edge[vertex] != -1:
																lowerCAmelCase_			,						lowerCAmelCase_			,						lowerCAmelCase_      			=			cheap_edge[vertex]
																if union_find.find(_UpperCamelCase  ) != union_find.find(_UpperCamelCase  ):
																			union_find.union(_UpperCamelCase       ,       _UpperCamelCase  )
																			mst_edges.append(cheap_edge[vertex]  )
																			lowerCAmelCase_      			=			num_components - 1
							lowerCAmelCase_      			=			Graph.build(edges=_UpperCamelCase  )
							return mst




from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
)


_A     =  {
    "configuration_wav2vec2": ["WAV_2_VEC_2_PRETRAINED_CONFIG_ARCHIVE_MAP", "Wav2Vec2Config"],
    "feature_extraction_wav2vec2": ["Wav2Vec2FeatureExtractor"],
    "processing_wav2vec2": ["Wav2Vec2Processor"],
    "tokenization_wav2vec2": ["Wav2Vec2CTCTokenizer", "Wav2Vec2Tokenizer"],
}


try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_A     =  [
			    "WAV_2_VEC_2_PRETRAINED_MODEL_ARCHIVE_LIST",
			    "Wav2Vec2ForAudioFrameClassification",
			    "Wav2Vec2ForCTC",
			    "Wav2Vec2ForMaskedLM",
			    "Wav2Vec2ForPreTraining",
			    "Wav2Vec2ForSequenceClassification",
			    "Wav2Vec2ForXVector",
			    "Wav2Vec2Model",
			    "Wav2Vec2PreTrainedModel",
			]

try:
			if not is_tf_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_A     =  [
			    "TF_WAV_2_VEC_2_PRETRAINED_MODEL_ARCHIVE_LIST",
			    "TFWav2Vec2ForCTC",
			    "TFWav2Vec2Model",
			    "TFWav2Vec2PreTrainedModel",
			    "TFWav2Vec2ForSequenceClassification",
			]

try:
			if not is_flax_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_A     =  [
			    "FlaxWav2Vec2ForCTC",
			    "FlaxWav2Vec2ForPreTraining",
			    "FlaxWav2Vec2Model",
			    "FlaxWav2Vec2PreTrainedModel",
			]


if TYPE_CHECKING:
			from .configuration_wavaveca import WAV_2_VEC_2_PRETRAINED_CONFIG_ARCHIVE_MAP, WavaVecaConfig
			from .feature_extraction_wavaveca import WavaVecaFeatureExtractor
			from .processing_wavaveca import WavaVecaProcessor
			from .tokenization_wavaveca import WavaVecaCTCTokenizer, WavaVecaTokenizer

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_wavaveca import (
						    WAV_2_VEC_2_PRETRAINED_MODEL_ARCHIVE_LIST,
						    WavaVecaForAudioFrameClassification,
						    WavaVecaForCTC,
						    WavaVecaForMaskedLM,
						    WavaVecaForPreTraining,
						    WavaVecaForSequenceClassification,
						    WavaVecaForXVector,
						    WavaVecaModel,
						    WavaVecaPreTrainedModel,
						)

			try:
						if not is_tf_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_tf_wavaveca import (
						    TF_WAV_2_VEC_2_PRETRAINED_MODEL_ARCHIVE_LIST,
						    TFWavaVecaForCTC,
						    TFWavaVecaForSequenceClassification,
						    TFWavaVecaModel,
						    TFWavaVecaPreTrainedModel,
						)

			try:
						if not is_flax_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_tf_wavaveca import (
						    FlaxWavaVecaForCTC,
						    FlaxWavaVecaForPreTraining,
						    FlaxWavaVecaModel,
						    FlaxWavaVecaPreTrainedModel,
						)


else:
			import sys

			_A     =  _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)



