





from __future__ import annotations

from typing import Any






class   snake_case_							(						_A		):
  pass






class   snake_case_							:






  def __init__(				self					:	int  ,    _snake_case					:	Any     )->None:






   '''simple docstring'''

   __lowerCAmelCase	:			Tuple         =  data
   __lowerCAmelCase	:			List[Any]         =  None






  def __iter__(				self					:	int     )->Optional[Any]:






   '''simple docstring'''

   __lowerCAmelCase	:			List[str]         =  self
   __lowerCAmelCase	:			Dict         =  []
   while node:
    if node in visited:
     raise ContainsLoopError
    visited.append(__lowerCAmelCase     )
    yield node.data
    __lowerCAmelCase	:			Any         =  node.next_node






  @property
  def  UpperCAmelCase__		(				self					:	str     )->bool:






   '''simple docstring'''

   try:
    list(self     )
    return False
   except ContainsLoopError:
    return True


if __name__ == "__main__":
      _UpperCAmelCase       =				Node(1)
      _UpperCAmelCase       =				Node(2)
      _UpperCAmelCase       =				Node(3)
      _UpperCAmelCase       =				Node(4)
      print(root_node.has_loop)  # False
      _UpperCAmelCase       =				root_node.next_node
      print(root_node.has_loop)  # True

      _UpperCAmelCase       =				Node(5)
      _UpperCAmelCase       =				Node(6)
      _UpperCAmelCase       =				Node(5)
      _UpperCAmelCase       =				Node(6)
      print(root_node.has_loop)  # False

      _UpperCAmelCase       =				Node(1)
      print(root_node.has_loop)  # False




def 	SCREAMING_SNAKE_CASE_							(	_snake_case	:list				)  ->     bool:
   if not isinstance(_snake_case	,   _snake_case				):
      raise ValueError('''Input series is not valid, valid series - [2, 4, 6]'''				)
   if len(_snake_case				) == 0:
      raise ValueError('''Input list must be a non empty list'''				)
   if len(_snake_case				) == 1:
      return True
   _A      =       series[1] - series[0]
   for index in range(len(_snake_case				) - 1				):
      if series[index + 1] - series[index] != common_diff:
         return False
   return True

def 	SCREAMING_SNAKE_CASE_							(	_snake_case	:list				)  ->     float:
   if not isinstance(_snake_case	,   _snake_case				):
      raise ValueError('''Input series is not valid, valid series - [2, 4, 6]'''				)
   if len(_snake_case				) == 0:
      raise ValueError('''Input list must be a non empty list'''				)
   _A      =       0
   for val in series:
      answer += val
   return answer / len(_snake_case				)


if __name__ == "__main__":
   import doctest

   doctest.testmod()



