
'''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__)








'''simple docstring'''



def 	_A						(							lowercase__		):
						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
						lowercase__								=    []
						lowercase__								=    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]		)
						lowercase__								=    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 	_A						(							lowercase__		):
						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"""		)
						lowercase__								=    0
						for val in series:
												answer += 1 / val
						return len(lowercase__		) / answer


if __name__ == "__main__":
				import doctest

				doctest.testmod()






