






def 			__UpperCAmelCase				(lowercase__				)		->				bool:

						'''simple docstring'''


						if not isinstance(lowercase__	,lowercase__				):
												raise ValueError("Input series is not valid, valid series - [1, 2/3, 2]"				)
						if len(lowercase__				) == 0:
												raise ValueError("Input list must be a non empty list"				)
						if len(lowercase__				) == 1 and series[0] != 0:
												return True
						a_				     =   []
						a_				     =   len(lowercase__				)
						for i in range(0	,lowercase__				):
												if series[i] == 0:
																		raise ValueError("Input series cannot have 0 as an element"				)
												rec_series.append(1 / series[i]				)
						a_				     =   rec_series[1] - rec_series[0]
						for index in range(2	,lowercase__				):
												if rec_series[index] - rec_series[index - 1] != common_diff:
																		return False
						return True



def 			__UpperCAmelCase				(lowercase__				)		->				float:

						'''simple docstring'''


						if not isinstance(lowercase__	,lowercase__				):
												raise ValueError("Input series is not valid, valid series - [2, 4, 6]"				)
						if len(lowercase__				) == 0:
												raise ValueError("Input list must be a non empty list"				)
						a_				     =   0
						for val in series:
												answer += 1 / val
						return len(lowercase__				) / answer


if __name__ == "__main__":
							import doctest

							doctest.testmod()











'''simple docstring'''





from typing import TYPE_CHECKING

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


a_      = {
    'configuration_segformer': ['SEGFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP', 'SegformerConfig', 'SegformerOnnxConfig']
}

try:
							if not is_vision_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							a_      = ['SegformerFeatureExtractor']
							a_      = ['SegformerImageProcessor']

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							a_      = [
							    'SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
							    'SegformerDecodeHead',
							    'SegformerForImageClassification',
							    'SegformerForSemanticSegmentation',
							    'SegformerLayer',
							    'SegformerModel',
							    'SegformerPreTrainedModel',
							]

try:
							if not is_tf_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							a_      = [
							    'TF_SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
							    'TFSegformerDecodeHead',
							    'TFSegformerForImageClassification',
							    'TFSegformerForSemanticSegmentation',
							    'TFSegformerModel',
							    'TFSegformerPreTrainedModel',
							]


if TYPE_CHECKING:
							from .configuration_segformer import SEGFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, SegformerConfig, SegformerOnnxConfig

							try:
														if not is_vision_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .feature_extraction_segformer import SegformerFeatureExtractor
														from .image_processing_segformer import SegformerImageProcessor

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_segformer import (
														    SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
														    SegformerDecodeHead,
														    SegformerForImageClassification,
														    SegformerForSemanticSegmentation,
														    SegformerLayer,
														    SegformerModel,
														    SegformerPreTrainedModel,
														)
							try:
														if not is_tf_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_tf_segformer import (
														    TF_SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
														    TFSegformerDecodeHead,
														    TFSegformerForImageClassification,
														    TFSegformerForSemanticSegmentation,
														    TFSegformerModel,
														    TFSegformerPreTrainedModel,
														)

else:
							import sys

							a_      = _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)



