





class 	UpperCamelCase__				:



     '''simple docstring'''

     def __init__(							self		:					int		,lowerCamelCase__		:					int		,lowerCamelCase__		:					str=None		,lowerCamelCase__		:					Optional[int]=None )  ->	List[str]:




           '''simple docstring'''


           SCREAMING_SNAKE_CASE	=		data
           SCREAMING_SNAKE_CASE	=		previous
           SCREAMING_SNAKE_CASE	=		next_node






     def __str__(							self		:					Union[str, Any] )  ->	str:




           '''simple docstring'''


           return F"""{self.data}"""






     def        SCREAMING_SNAKE_CASE__						(							self		:					List[str] )  ->	int:




           '''simple docstring'''


           return self.data






     def        SCREAMING_SNAKE_CASE__						(							self		:					Union[str, Any] )  ->	Tuple:




           '''simple docstring'''


           return self.next






     def        SCREAMING_SNAKE_CASE__						(							self		:					Optional[Any] )  ->	Union[str, Any]:




           '''simple docstring'''


           return self.previous

class 	UpperCamelCase__				:



     '''simple docstring'''

     def __init__(							self		:					Optional[Any]		,lowerCamelCase__		:					Dict )  ->	Union[str, Any]:




           '''simple docstring'''


           SCREAMING_SNAKE_CASE	=		head






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




           '''simple docstring'''


           return self






     def        SCREAMING_SNAKE_CASE__						(							self		:					List[str] )  ->	Any:




           '''simple docstring'''


           if not self.current:
                 raise StopIteration
           else:
                 SCREAMING_SNAKE_CASE	=		self.current.get_data()
                 SCREAMING_SNAKE_CASE	=		self.current.get_next()
                 return value

class 	UpperCamelCase__				:



     '''simple docstring'''

     def __init__(							self		:					str )  ->	Optional[int]:




           '''simple docstring'''


           SCREAMING_SNAKE_CASE	=		None  # First node in list
           SCREAMING_SNAKE_CASE	=		None  # Last node in list






     def __str__(							self		:					str )  ->	str:




           '''simple docstring'''


           SCREAMING_SNAKE_CASE	=		self.head
           SCREAMING_SNAKE_CASE	=		[]
           while current is not None:
                 nodes.append(current.get_data() )
                 SCREAMING_SNAKE_CASE	=		current.get_next()
           return " ".join(str(lowerCamelCase__ ) for node in nodes )






     def __contains__(							self		:					Tuple		,lowerCamelCase__		:					int )  ->	Optional[Any]:




           '''simple docstring'''


           SCREAMING_SNAKE_CASE	=		self.head
           while current:
                 if current.get_data() == value:
                       return True
                 SCREAMING_SNAKE_CASE	=		current.get_next()
           return False






     def __iter__(							self		:					Dict )  ->	Dict:




           '''simple docstring'''


           return LinkedListIterator(self.head )






     def        SCREAMING_SNAKE_CASE__						(							self		:					Any )  ->	Union[str, Any]:




           '''simple docstring'''


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






     def        SCREAMING_SNAKE_CASE__						(							self		:					Optional[int] )  ->	int:




           '''simple docstring'''


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






     def        SCREAMING_SNAKE_CASE__						(							self		:					Optional[int]		,lowerCamelCase__		:					Node )  ->	None:




           '''simple docstring'''


           if self.head is None:
                 SCREAMING_SNAKE_CASE	=		node
                 SCREAMING_SNAKE_CASE	=		node
           else:
                 self.insert_before_node(self.head		,lowerCamelCase__ )






     def        SCREAMING_SNAKE_CASE__						(							self		:					Tuple		,lowerCamelCase__		:					Node )  ->	None:




           '''simple docstring'''


           if self.head is None:
                 self.set_head(lowerCamelCase__ )
           else:
                 self.insert_after_node(self.tail		,lowerCamelCase__ )






     def        SCREAMING_SNAKE_CASE__						(							self		:					Dict		,lowerCamelCase__		:					int )  ->	None:




           '''simple docstring'''


           SCREAMING_SNAKE_CASE	=		Node(lowerCamelCase__ )
           if self.head is None:
                 self.set_head(lowerCamelCase__ )
           else:
                 self.set_tail(lowerCamelCase__ )






     def        SCREAMING_SNAKE_CASE__						(							self		:					str		,lowerCamelCase__		:					Node		,lowerCamelCase__		:					Node )  ->	None:




           '''simple docstring'''


           SCREAMING_SNAKE_CASE	=		node
           SCREAMING_SNAKE_CASE	=		node.previous

           if node.get_previous() is None:
                 SCREAMING_SNAKE_CASE	=		node_to_insert
           else:
                 SCREAMING_SNAKE_CASE	=		node_to_insert

           SCREAMING_SNAKE_CASE	=		node_to_insert






     def        SCREAMING_SNAKE_CASE__						(							self		:					str		,lowerCamelCase__		:					Node		,lowerCamelCase__		:					Node )  ->	None:




           '''simple docstring'''


           SCREAMING_SNAKE_CASE	=		node
           SCREAMING_SNAKE_CASE	=		node.next

           if node.get_next() is None:
                 SCREAMING_SNAKE_CASE	=		node_to_insert
           else:
                 SCREAMING_SNAKE_CASE	=		node_to_insert

           SCREAMING_SNAKE_CASE	=		node_to_insert






     def        SCREAMING_SNAKE_CASE__						(							self		:					Optional[int]		,lowerCamelCase__		:					int		,lowerCamelCase__		:					int )  ->	None:




           '''simple docstring'''


           SCREAMING_SNAKE_CASE	=		1
           SCREAMING_SNAKE_CASE	=		Node(lowerCamelCase__ )
           SCREAMING_SNAKE_CASE	=		self.head
           while node:
                 if current_position == position:
                       self.insert_before_node(lowerCamelCase__		,lowerCamelCase__ )
                       return
                 current_position += 1
                 SCREAMING_SNAKE_CASE	=		node.next
           self.insert_after_node(self.tail		,lowerCamelCase__ )






     def        SCREAMING_SNAKE_CASE__						(							self		:					Optional[int]		,lowerCamelCase__		:					int )  ->	Node:




           '''simple docstring'''


           SCREAMING_SNAKE_CASE	=		self.head
           while node:
                 if node.get_data() == item:
                       return node
                 SCREAMING_SNAKE_CASE	=		node.get_next()
           raise Exception("""Node not found""" )






     def        SCREAMING_SNAKE_CASE__						(							self		:					Any		,lowerCamelCase__		:					str )  ->	int:




           '''simple docstring'''


           if (node := self.get_node(lowerCamelCase__ )) is not None:
                 if node == self.head:
                       SCREAMING_SNAKE_CASE	=		self.head.get_next()

                 if node == self.tail:
                       SCREAMING_SNAKE_CASE	=		self.tail.get_previous()

                 self.remove_node_pointers(lowerCamelCase__ )






     @staticmethod
     def        SCREAMING_SNAKE_CASE__						(							lowerCamelCase__		:					Node )  ->	None:




           '''simple docstring'''


           if node.get_next():
                 SCREAMING_SNAKE_CASE	=		node.previous

           if node.get_previous():
                 SCREAMING_SNAKE_CASE	=		node.next

           SCREAMING_SNAKE_CASE	=		None
           SCREAMING_SNAKE_CASE	=		None






     def        SCREAMING_SNAKE_CASE__						(							self		:					Optional[Any] )  ->	Tuple:




           '''simple docstring'''


           return self.head is None



def      __lowercase     (   )				->     None:


      '''simple docstring'''




if __name__ == "__main__":
      import doctest

      doctest.testmod()









from ..utils import DummyObject, requires_backends

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			Dict				=    ["sentencepiece"]






     def __init__(							self		:					int		,*lowerCamelCase__		:					Any		,**lowerCamelCase__		:					Any )  ->	str:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			Union[str, Any]				=    ["sentencepiece"]






     def __init__(							self		:					Any		,*lowerCamelCase__		:					str		,**lowerCamelCase__		:					List[Any] )  ->	str:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			str				=    ["sentencepiece"]






     def __init__(							self		:					Union[str, Any]		,*lowerCamelCase__		:					Union[str, Any]		,**lowerCamelCase__		:					Optional[int] )  ->	Optional[int]:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			Dict				=    ["sentencepiece"]






     def __init__(							self		:					Tuple		,*lowerCamelCase__		:					Dict		,**lowerCamelCase__		:					Any )  ->	Union[str, Any]:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			Dict				=    ["sentencepiece"]






     def __init__(							self		:					Optional[int]		,*lowerCamelCase__		:					List[Any]		,**lowerCamelCase__		:					Optional[int] )  ->	str:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			List[str]				=    ["sentencepiece"]






     def __init__(							self		:					Union[str, Any]		,*lowerCamelCase__		:					Union[str, Any]		,**lowerCamelCase__		:					Optional[Any] )  ->	Tuple:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			List[str]				=    ["sentencepiece"]






     def __init__(							self		:					int		,*lowerCamelCase__		:					List[str]		,**lowerCamelCase__		:					str )  ->	Optional[int]:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			int				=    ["sentencepiece"]






     def __init__(							self		:					Union[str, Any]		,*lowerCamelCase__		:					List[Any]		,**lowerCamelCase__		:					Optional[Any] )  ->	int:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			List[Any]				=    ["sentencepiece"]






     def __init__(							self		:					List[str]		,*lowerCamelCase__		:					List[str]		,**lowerCamelCase__		:					int )  ->	Tuple:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			Union[str, Any]				=    ["sentencepiece"]






     def __init__(							self		:					str		,*lowerCamelCase__		:					Union[str, Any]		,**lowerCamelCase__		:					List[str] )  ->	Optional[int]:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			Any				=    ["sentencepiece"]






     def __init__(							self		:					int		,*lowerCamelCase__		:					Dict		,**lowerCamelCase__		:					List[Any] )  ->	List[str]:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			Any				=    ["sentencepiece"]






     def __init__(							self		:					Dict		,*lowerCamelCase__		:					Any		,**lowerCamelCase__		:					Optional[int] )  ->	Union[str, Any]:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			Tuple				=    ["sentencepiece"]






     def __init__(							self		:					Dict		,*lowerCamelCase__		:					int		,**lowerCamelCase__		:					Optional[int] )  ->	Optional[Any]:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			List[Any]				=    ["sentencepiece"]






     def __init__(							self		:					Optional[Any]		,*lowerCamelCase__		:					Tuple		,**lowerCamelCase__		:					int )  ->	Any:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			Tuple				=    ["sentencepiece"]






     def __init__(							self		:					Optional[Any]		,*lowerCamelCase__		:					Tuple		,**lowerCamelCase__		:					Dict )  ->	Union[str, Any]:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			List[Any]				=    ["sentencepiece"]






     def __init__(							self		:					int		,*lowerCamelCase__		:					str		,**lowerCamelCase__		:					Optional[Any] )  ->	Dict:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			int				=    ["sentencepiece"]






     def __init__(							self		:					Union[str, Any]		,*lowerCamelCase__		:					Any		,**lowerCamelCase__		:					str )  ->	List[Any]:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			Dict				=    ["sentencepiece"]






     def __init__(							self		:					int		,*lowerCamelCase__		:					Any		,**lowerCamelCase__		:					Dict )  ->	List[Any]:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			int				=    ["sentencepiece"]






     def __init__(							self		:					List[Any]		,*lowerCamelCase__		:					str		,**lowerCamelCase__		:					Any )  ->	int:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			Union[str, Any]				=    ["sentencepiece"]






     def __init__(							self		:					Dict		,*lowerCamelCase__		:					Optional[int]		,**lowerCamelCase__		:					str )  ->	Tuple:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			str				=    ["sentencepiece"]






     def __init__(							self		:					Union[str, Any]		,*lowerCamelCase__		:					int		,**lowerCamelCase__		:					Any )  ->	List[str]:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			Any				=    ["sentencepiece"]






     def __init__(							self		:					Dict		,*lowerCamelCase__		:					Tuple		,**lowerCamelCase__		:					str )  ->	int:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			List[str]				=    ["sentencepiece"]






     def __init__(							self		:					Optional[int]		,*lowerCamelCase__		:					Optional[int]		,**lowerCamelCase__		:					Union[str, Any] )  ->	Tuple:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			str				=    ["sentencepiece"]






     def __init__(							self		:					Optional[Any]		,*lowerCamelCase__		:					Optional[int]		,**lowerCamelCase__		:					List[Any] )  ->	Any:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			Optional[Any]				=    ["sentencepiece"]






     def __init__(							self		:					List[str]		,*lowerCamelCase__		:					Tuple		,**lowerCamelCase__		:					str )  ->	Union[str, Any]:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			Optional[int]				=    ["sentencepiece"]






     def __init__(							self		:					Optional[Any]		,*lowerCamelCase__		:					Tuple		,**lowerCamelCase__		:					str )  ->	Dict:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			Tuple				=    ["sentencepiece"]






     def __init__(							self		:					Any		,*lowerCamelCase__		:					Optional[int]		,**lowerCamelCase__		:					Any )  ->	Optional[int]:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			Dict				=    ["sentencepiece"]






     def __init__(							self		:					Union[str, Any]		,*lowerCamelCase__		:					List[str]		,**lowerCamelCase__		:					List[Any] )  ->	str:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			str				=    ["sentencepiece"]






     def __init__(							self		:					int		,*lowerCamelCase__		:					str		,**lowerCamelCase__		:					str )  ->	Dict:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			Union[str, Any]				=    ["sentencepiece"]






     def __init__(							self		:					int		,*lowerCamelCase__		:					List[Any]		,**lowerCamelCase__		:					Optional[int] )  ->	List[str]:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )

class 	UpperCamelCase__				(   metaclass=lowerCAmelCase_     ):



     '''simple docstring'''

     __snake_case					:			Union[str, Any]				=    ["sentencepiece"]






     def __init__(							self		:					List[Any]		,*lowerCamelCase__		:					Tuple		,**lowerCamelCase__		:					Dict )  ->	Dict:




           '''simple docstring'''


           requires_backends(self		,["""sentencepiece"""] )


