
def     UpperCAmelCase__							(       __magic_name__						:     Dict  ):


		'''simple docstring'''

		if not isinstance(__magic_name__							,  __magic_name__  ):
				raise ValueError('''Input series is not valid, valid series - [1, 2/3, 2]'''  )
		if len(__magic_name__  ) == 0:
				raise ValueError('''Input list must be a non empty list'''  )
		if len(__magic_name__  ) == 1 and series[0] != 0:
				return True
		lowerCAmelCase		:					Optional[int]  	=     []
		lowerCAmelCase		:					Optional[int]  	=     len(__magic_name__  )
		for i in range(0							,  __magic_name__  ):
				if series[i] == 0:
						raise ValueError('''Input series cannot have 0 as an element'''  )
				rec_series.append(1 / series[i]  )
		lowerCAmelCase		:					Union[str, Any]  	=     rec_series[1] - rec_series[0]
		for index in range(2							,  __magic_name__  ):
				if rec_series[index] - rec_series[index - 1] != common_diff:
						return False
		return True
def     UpperCAmelCase__							(       __magic_name__						:     Union[str, Any]  ):


		'''simple docstring'''

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


if __name__ == "__main__":
		import doctest

		doctest.testmod()


from typing import TYPE_CHECKING

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


__SCREAMING_SNAKE_CASE			:   str         =     {
    'configuration_deta': ['DETA_PRETRAINED_CONFIG_ARCHIVE_MAP', 'DetaConfig'],
}

try:
		if not is_vision_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__SCREAMING_SNAKE_CASE			:   Optional[int]         =     ['DetaImageProcessor']

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__SCREAMING_SNAKE_CASE			:   str         =     [
		    'DETA_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'DetaForObjectDetection',
		    'DetaModel',
		    'DetaPreTrainedModel',
		]


if TYPE_CHECKING:
		from .configuration_deta import DETA_PRETRAINED_CONFIG_ARCHIVE_MAP, DetaConfig

		try:
				if not is_vision_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .image_processing_deta import DetaImageProcessor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_deta import (
				    DETA_PRETRAINED_MODEL_ARCHIVE_LIST,
				    DetaForObjectDetection,
				    DetaModel,
				    DetaPreTrainedModel,
				)

else:
		import sys

		__SCREAMING_SNAKE_CASE			:   Dict         =     _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)
