


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


lowercase_	   =     {
    'configuration_poolformer': [
        'POOLFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'PoolFormerConfig',
        'PoolFormerOnnxConfig',
    ]
}

try:
       if not is_vision_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       lowercase_	   =     ['PoolFormerFeatureExtractor']
       lowercase_	   =     ['PoolFormerImageProcessor']

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       lowercase_	   =     [
           'POOLFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
           'PoolFormerForImageClassification',
           'PoolFormerModel',
           'PoolFormerPreTrainedModel',
       ]


if TYPE_CHECKING:
       from .configuration_poolformer import (
           POOLFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
           PoolFormerConfig,
           PoolFormerOnnxConfig,
       )

       try:
              if not is_vision_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .feature_extraction_poolformer import PoolFormerFeatureExtractor
              from .image_processing_poolformer import PoolFormerImageProcessor

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_poolformer import (
                  POOLFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
                  PoolFormerForImageClassification,
                  PoolFormerModel,
                  PoolFormerPreTrainedModel,
              )


else:
       import sys

       lowercase_	   =     _LazyModule(__name__, globals()['__file__'], _import_structure)





from __future__ import annotations
def 				UpperCamelCase__					(  SCREAMING_SNAKE_CASE__						):
 __lowerCamelCase		:							Optional[Any]		 =						0.00
 __lowerCamelCase		:							Tuple		 =						0
 for resistor in resistors:
  if resistor <= 0:
   __lowerCamelCase		:							Union[str, Any]		 =						f'Resistor at index {index} has a negative or zero value!'
   raise ValueError(SCREAMING_SNAKE_CASE__						)
  first_sum += 1 / float(SCREAMING_SNAKE_CASE__						)
  index += 1
 return 1 / first_sum
def 				UpperCamelCase__					(  SCREAMING_SNAKE_CASE__						):
 __lowerCamelCase		:							Union[str, Any]		 =						0.00
 __lowerCamelCase		:							str		 =						0
 for resistor in resistors:
  sum_r += resistor
  if resistor < 0:
   __lowerCamelCase		:							Any		 =						f'Resistor at index {index} has a negative value!'
   raise ValueError(SCREAMING_SNAKE_CASE__						)
  index += 1
 return sum_r


if __name__ == "__main__":
       import doctest

       doctest.testmod()

