
"""simple docstring"""







def    __lowerCAmelCase    (_UpperCamelCase		):
	if not isinstance(_UpperCamelCase	,  _UpperCamelCase		):
		raise ValueError('Input series is not valid, valid series - [2, 4, 6]'		)
	if len(_UpperCamelCase		) == 0:
		raise ValueError('Input list must be a non empty list'		)
	if len(_UpperCamelCase		) == 1:
		return True
	__lowerCAmelCase      :						List[str]						      =				series[1] - series[0]
	for index in range(len(_UpperCamelCase		) - 1		):
		if series[index + 1] - series[index] != common_diff:
			return False
	return True
def    __lowerCAmelCase    (_UpperCamelCase		):
	if not isinstance(_UpperCamelCase	,  _UpperCamelCase		):
		raise ValueError('Input series is not valid, valid series - [2, 4, 6]'		)
	if len(_UpperCamelCase		) == 0:
		raise ValueError('Input list must be a non empty list'		)
	__lowerCAmelCase      :						Tuple						      =				0
	for val in series:
		answer += val
	return answer / len(_UpperCamelCase		)


if __name__ == "__main__":
							import doctest

							doctest.testmod()

"""simple docstring"""







from typing import Optional
from urllib.parse import quote

import huggingface_hub as hfh
from packaging import version
def    __lowerCAmelCase    (_UpperCamelCase	,  _UpperCamelCase	,  _UpperCamelCase = None		):
	if version.parse(hfh.__version__		).release < version.parse('0.11.0'		).release:
		# old versions of hfh don't url-encode the file path
		__lowerCAmelCase      :						List[str]						      =				quote(_UpperCamelCase		)
	return hfh.hf_hub_url(_UpperCamelCase	,  _UpperCamelCase	,  repo_type='dataset'	,  revision=_UpperCamelCase		)