




def 							_UpperCAmelCase     (UpperCamelCase_       :       List[Any]				):
				'''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
				_lowerCAmelCase			:			List[str]        =					[]
				_lowerCAmelCase			:			Tuple        =					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]				)
				_lowerCAmelCase			:			Optional[Any]        =					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     (UpperCamelCase_       :       Dict				):
				'''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"""				)
				_lowerCAmelCase			:			Tuple        =					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_torch_available, is_vision_available


__A     :    int    =		{'configuration_bit': ['BIT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'BitConfig', 'BitOnnxConfig']}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	__A     :    Optional[Any]    =		[
	    'BIT_PRETRAINED_MODEL_ARCHIVE_LIST',
	    'BitForImageClassification',
	    'BitModel',
	    'BitPreTrainedModel',
	    'BitBackbone',
	]


try:
	if not is_vision_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	__A     :    List[Any]    =		['BitImageProcessor']


if TYPE_CHECKING:
	from .configuration_bit import BIT_PRETRAINED_CONFIG_ARCHIVE_MAP, BitConfig, BitOnnxConfig

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_bit import (
		    BIT_PRETRAINED_MODEL_ARCHIVE_LIST,
		    BitBackbone,
		    BitForImageClassification,
		    BitModel,
		    BitPreTrainedModel,
		)

	try:
		if not is_vision_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .image_processing_bit import BitImageProcessor

else:
	import sys

	__A     :    Union[str, Any]    =		_LazyModule(__name__, globals()['__file__'], _import_structure)





