



"""simple docstring"""


from __future__ import annotations

def  _lowerCAmelCase      (   lowercase_		,	lowercase_		,	lowercase_						):
						if (voltage, current, resistance).count(0						) != 1:
												raise ValueError('One and only one argument must be 0'						)
						if resistance < 0:
												raise ValueError('Resistance cannot be negative'						)
						if voltage == 0:
												return {"voltage": float(current * resistance						)}
						elif current == 0:
												return {"current": voltage / resistance}
						elif resistance == 0:
												return {"resistance": voltage / current}
						else:
												raise ValueError('Exactly one argument must be 0'						)


if __name__ == "__main__":
				import doctest

				doctest.testmod()







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

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





@dataclass(frozen=__SCREAMING_SNAKE_CASE)
class 							A__		(	__SCREAMING_SNAKE_CASE):
      _UpperCAmelCase				:    str           =			field(default="""automatic-speech-recognition"""  ,   metadata={"""include_in_asdict_even_if_is_default""": True})
      _UpperCAmelCase				:    ClassVar[Features]           =			Features({"""audio""": Audio()})
      _UpperCAmelCase				:    ClassVar[Features]           =			Features({"""transcription""": Value("""string""")})
      _UpperCAmelCase				:    str           =			"audio"
      _UpperCAmelCase				:    str           =			"transcription"
      def 						UpperCamelCase__							(      self    ,  __magic_name__      ):
       if self.audio_column not in features:
        raise ValueError(F'''Column {self.audio_column} is not present in features.'''      )
       if not isinstance(features[self.audio_column]    ,  __magic_name__      ):
        raise ValueError(F'''Column {self.audio_column} is not an Audio type.'''      )
       lowerCamelCase		:	Optional[Any]							=      copy.deepcopy(self      )
       lowerCamelCase		:	List[Any]							=      self.input_schema.copy()
       lowerCamelCase		:	Tuple							=      features[self.audio_column]
       lowerCamelCase		:	int							=      input_schema
       return task_template






      @property
      def 						UpperCamelCase__							(      self      ):
       return {self.audio_column: "audio", self.transcription_column: "transcription"}




