






from __future__ import annotations

def     snake_case   (UpperCAmelCase__    )			->							float:
  UpperCamelCase_:   Optional[Any]        =							0.00
  UpperCamelCase_:   List[Any]        =							0
  for resistor in resistors:
    if resistor <= 0:
      UpperCamelCase_:   Union[str, Any]        =							F'''Resistor at index {index} has a negative or zero value!'''
      raise ValueError(UpperCAmelCase__    )
    first_sum += 1 / float(UpperCAmelCase__    )
    index += 1
  return 1 / first_sum

def     snake_case   (UpperCAmelCase__    )			->							float:
  UpperCamelCase_:   Tuple        =							0.00
  UpperCamelCase_:   Union[str, Any]        =							0
  for resistor in resistors:
    sum_r += resistor
    if resistor < 0:
      UpperCamelCase_:   Optional[int]        =							F'''Resistor at index {index} has a negative value!'''
      raise ValueError(UpperCAmelCase__    )
    index += 1
  return sum_r


if __name__ == "__main__":
   import doctest

   doctest.testmod()



from typing import TYPE_CHECKING

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


_lowerCAmelCase:						Optional[Any]   				=       {
    'configuration_swiftformer': [
        'SWIFTFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'SwiftFormerConfig',
        'SwiftFormerOnnxConfig',
    ]
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	_lowerCAmelCase:						List[str]   				=       [
	    'SWIFTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
	    'SwiftFormerForImageClassification',
	    'SwiftFormerModel',
	    'SwiftFormerPreTrainedModel',
	]

if TYPE_CHECKING:
	from .configuration_swiftformer import (
	    SWIFTFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
	    SwiftFormerConfig,
	    SwiftFormerOnnxConfig,
	)

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_swiftformer import (
		    SWIFTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
		    SwiftFormerForImageClassification,
		    SwiftFormerModel,
		    SwiftFormerPreTrainedModel,
		)

else:
	import sys

	_lowerCAmelCase:						List[Any]   				=       _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)

