




"""simple docstring"""


from ..utils import DummyObject, requires_backends


class _lowerCamelCase    (					metaclass=a_						):
   _lowerCamelCase    :Tuple     				=     ["torch", "torchsde"]






   def __init__(		self       :		Union[str, Any]   ,     *UpperCamelCase       :		str   ,     **UpperCamelCase       :		int   )			->						Tuple:

         """simple docstring"""
         requires_backends(self   ,     ["""torch""", """torchsde"""]   )






   @classmethod
   def 	_lowerCAmelCase   (		cls       :		Dict   ,     *UpperCamelCase       :		List[Any]   ,     **UpperCamelCase       :		Optional[Any]   )			->						Any:

         """simple docstring"""
         requires_backends(cls   ,     ["""torch""", """torchsde"""]   )






   @classmethod
   def 	_lowerCAmelCase   (		cls       :		Tuple   ,     *UpperCamelCase       :		Dict   ,     **UpperCamelCase       :		Any   )			->						Any:

         """simple docstring"""
         requires_backends(cls   ,     ["""torch""", """torchsde"""]   )











"""simple docstring"""


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 _lowerCamelCase    (					a_						):
   _lowerCamelCase    :str     				=     field(default="audio-classification"       ,	metadata={"include_in_asdict_even_if_is_default": True}						)
   _lowerCamelCase    :ClassVar[Features]     				=     Features({"audio": Audio()}						)
   _lowerCamelCase    :ClassVar[Features]     				=     Features({"labels": ClassLabel}						)
   _lowerCamelCase    :str     				=     "audio"
   _lowerCamelCase    :str     				=     "labels"






   def 	_lowerCAmelCase   (		self       :		str   ,     UpperCamelCase       :		Optional[int]   )			->						Union[str, Any]:

         """simple docstring"""
         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]   ,     UpperCamelCase   ):
               raise ValueError(f"""Column {self.label_column} is not a ClassLabel."""   )
         lowerCAmelCase__      :			str   =	copy.deepcopy(self   )
         lowerCAmelCase__      :			Optional[int]   =	self.label_schema.copy()
         lowerCAmelCase__      :			List[Any]   =	features[self.label_column]
         lowerCAmelCase__      :			Optional[int]   =	label_schema
         return task_template






   @property
   def 	_lowerCAmelCase   (		self       :		List[Any]   )			->						Dict[str, str]:

         """simple docstring"""
         return {
             self.audio_column: "audio",
             self.label_column: "labels",
         }





