



"""simple docstring"""






from __future__ import annotations


def     _lowercase       (						__snake_case			)		->     float:
			__lowerCAmelCase   :						Optional[int]				= 0.00
			__lowerCAmelCase   :						List[Any]				= 0
			for resistor in resistors:
						if resistor <= 0:
									__lowerCAmelCase   :						List[Any]				= F"""Resistor at index {index} has a negative or zero value!"""
									raise ValueError(__snake_case			)
						first_sum += 1 / float(__snake_case			)
						index += 1
			return 1 / first_sum


def     _lowercase       (						__snake_case			)		->     float:
			__lowerCAmelCase   :						int				= 0.00
			__lowerCAmelCase   :						str				= 0
			for resistor in resistors:
						sum_r += resistor
						if resistor < 0:
									__lowerCAmelCase   :						str				= F"""Resistor at index {index} has a negative value!"""
									raise ValueError(__snake_case			)
						index += 1
			return sum_r


if __name__ == "__main__":
	import doctest

	doctest.testmod()




"""simple docstring"""






from ..utils import DummyObject, requires_backends



class     A__     (						metaclass=__SCREAMING_SNAKE_CASE							):




	'''simple docstring'''





	SCREAMING_SNAKE_CASE					   =			['torch', 'scipy']

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

				"""simple docstring"""

				requires_backends(self ,    ["torch", "scipy"])

	@classmethod
	def 							_SCREAMING_SNAKE_CASE     (  cls:	Optional[Any] ,    *_SCREAMING_SNAKE_CASE:	Tuple ,    **_SCREAMING_SNAKE_CASE:	Optional[Any])       -> Optional[Any]:

				"""simple docstring"""

				requires_backends(cls ,    ["torch", "scipy"])







	@classmethod
	def 							_SCREAMING_SNAKE_CASE     (  cls:	int ,    *_SCREAMING_SNAKE_CASE:	List[Any] ,    **_SCREAMING_SNAKE_CASE:	Dict)       -> Union[str, Any]:

				"""simple docstring"""

				requires_backends(cls ,    ["torch", "scipy"])