


'''simple docstring'''



class 		_snake_case					:




					def __init__(      self							,							_lowerCamelCase							,							_lowerCamelCase=None							,							_lowerCamelCase=None):
								UpperCAmelCase__  :					Tuple        =     data
								UpperCAmelCase__  :					Tuple        =     previous
								UpperCAmelCase__  :					Optional[Any]        =     next_node




					def __str__(      self):
								return f'''{self.data}'''




					def 				snake_case__						(      self):
								return self.data




					def 				snake_case__						(      self):
								return self.next




					def 				snake_case__						(      self):
								return self.previous


class 		_snake_case					:




					def __init__(      self							,							_lowerCamelCase):
								UpperCAmelCase__  :					Any        =     head




					def __iter__(      self):
								return self




					def 				snake_case__						(      self):
								if not self.current:
											raise StopIteration
								else:
											UpperCAmelCase__  :					Union[str, Any]        =     self.current.get_data()
											UpperCAmelCase__  :					Optional[Any]        =     self.current.get_next()
											return value


class 		_snake_case					:




					def __init__(      self):
								UpperCAmelCase__  :					Tuple        =     None  # First node in list
								UpperCAmelCase__  :					List[str]        =     None  # Last node in list




					def __str__(      self):
								UpperCAmelCase__  :					Union[str, Any]        =     self.head
								UpperCAmelCase__  :					List[Any]        =     []
								while current is not None:
											nodes.append(current.get_data())
											UpperCAmelCase__  :					str        =     current.get_next()
								return " ".join(str(_lowerCamelCase) for node in nodes)




					def __contains__(      self							,							_lowerCamelCase):
								UpperCAmelCase__  :					List[str]        =     self.head
								while current:
											if current.get_data() == value:
														return True
											UpperCAmelCase__  :					List[str]        =     current.get_next()
								return False




					def __iter__(      self):
								return LinkedListIterator(self.head)




					def 				snake_case__						(      self):
								if self.head:
											return self.head.get_data()
								return None




					def 				snake_case__						(      self):
								if self.tail:
											return self.tail.get_data()
								return None




					def 				snake_case__						(      self							,							_lowerCamelCase):
								if self.head is None:
											UpperCAmelCase__  :					str        =     node
											UpperCAmelCase__  :					List[Any]        =     node
								else:
											self.insert_before_node(self.head							,							_lowerCamelCase)




					def 				snake_case__						(      self							,							_lowerCamelCase):
								if self.head is None:
											self.set_head(_lowerCamelCase)
								else:
											self.insert_after_node(self.tail							,							_lowerCamelCase)




					def 				snake_case__						(      self							,							_lowerCamelCase):
								UpperCAmelCase__  :					Tuple        =     Node(_lowerCamelCase)
								if self.head is None:
											self.set_head(_lowerCamelCase)
								else:
											self.set_tail(_lowerCamelCase)




					def 				snake_case__						(      self							,							_lowerCamelCase							,							_lowerCamelCase):
								UpperCAmelCase__  :					Any        =     node
								UpperCAmelCase__  :					str        =     node.previous

								if node.get_previous() is None:
											UpperCAmelCase__  :					List[Any]        =     node_to_insert
								else:
											UpperCAmelCase__  :					Union[str, Any]        =     node_to_insert

								UpperCAmelCase__  :					Optional[Any]        =     node_to_insert




					def 				snake_case__						(      self							,							_lowerCamelCase							,							_lowerCamelCase):
								UpperCAmelCase__  :					Optional[Any]        =     node
								UpperCAmelCase__  :					int        =     node.next

								if node.get_next() is None:
											UpperCAmelCase__  :					Optional[Any]        =     node_to_insert
								else:
											UpperCAmelCase__  :					Any        =     node_to_insert

								UpperCAmelCase__  :					Union[str, Any]        =     node_to_insert




					def 				snake_case__						(      self							,							_lowerCamelCase							,							_lowerCamelCase):
								UpperCAmelCase__  :					Dict        =     1
								UpperCAmelCase__  :					Union[str, Any]        =     Node(_lowerCamelCase)
								UpperCAmelCase__  :					Tuple        =     self.head
								while node:
											if current_position == position:
														self.insert_before_node(_lowerCamelCase							,							_lowerCamelCase)
														return
											current_position += 1
											UpperCAmelCase__  :					Union[str, Any]        =     node.next
								self.insert_after_node(self.tail							,							_lowerCamelCase)




					def 				snake_case__						(      self							,							_lowerCamelCase):
								UpperCAmelCase__  :					Tuple        =     self.head
								while node:
											if node.get_data() == item:
														return node
											UpperCAmelCase__  :					int        =     node.get_next()
								raise Exception("""Node not found""")




					def 				snake_case__						(      self							,							_lowerCamelCase):
								if (node := self.get_node(_lowerCamelCase)) is not None:
											if node == self.head:
														UpperCAmelCase__  :					Union[str, Any]        =     self.head.get_next()

											if node == self.tail:
														UpperCAmelCase__  :					Any        =     self.tail.get_previous()

											self.remove_node_pointers(_lowerCamelCase)




					@staticmethod
					def 				snake_case__						(      _lowerCamelCase):
								if node.get_next():
											UpperCAmelCase__  :					Tuple        =     node.previous

								if node.get_previous():
											UpperCAmelCase__  :					int        =     node.next

								UpperCAmelCase__  :					str        =     None
								UpperCAmelCase__  :					str        =     None




					def 				snake_case__						(      self):
								return self.head is None







def     _UpperCamelCase      (		):
			pass


if __name__ == "__main__":
		import doctest

		doctest.testmod()



'''simple docstring'''



import warnings
from functools import wraps
from typing import Callable







def     _UpperCamelCase      (		UpperCamelCase__					):

			@wraps(UpperCamelCase__					)
			def _inner_fn(*UpperCamelCase__ ,      **UpperCamelCase__					):
						warnings.warn(
						    (f'''\'{fn.__name__}\' is experimental and might be subject to breaking changes in the future.''') ,      UpperCamelCase__ ,      )
						return fn(*UpperCamelCase__ ,      **UpperCamelCase__					)

			return _inner_fn