






import copy
from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import Audio, ClassLabel, Features
from .base import TaskTemplate





@dataclass(frozen=_a							)
class     snake_case_			(				_a							):


							"""simple docstring"""





							__UpperCAmelCase       =field(default="""audio-classification"""			, metadata={"""include_in_asdict_even_if_is_default""": True}							)
							__UpperCAmelCase       =Features({"""audio""": Audio()}							)
							__UpperCAmelCase       =Features({"""labels""": ClassLabel}							)
							__UpperCAmelCase       ="audio"
							__UpperCAmelCase       ="labels"




							def        A__  ( self					,						_A							):

												if self.label_column not in features:
																	raise ValueError(F"""Column {self.label_column} is not present in features."""							)
												if not isinstance(features[self.label_column]					,						_A							):
																	raise ValueError(F"""Column {self.label_column} is not a ClassLabel."""							)
												__lowerCAmelCase					=							copy.deepcopy(self							)
												__lowerCAmelCase					=							self.label_schema.copy()
												__lowerCAmelCase					=							features[self.label_column]
												__lowerCAmelCase					=							label_schema
												return task_template




							@property
							def        A__  ( self							):
												return {
												    self.audio_column: "audio",
												    self.label_column: "labels",
												}









from graphs.minimum_spanning_tree_kruskal import kruskal


def        __lowercase    (  ):

					"""simple docstring"""






					__lowerCAmelCase					=							9
					__lowerCAmelCase					=							[
					    [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					=							kruskal(UpperCAmelCase__		,					UpperCAmelCase__      )

					__lowerCAmelCase					=							[
					    [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(UpperCAmelCase__      ) == sorted(UpperCAmelCase__      )






