class   _lowerCAmelCase		:







							def __init__(				self     :    int	,					__snake_case     :    int	,					__snake_case     :    List[Any]=None	,					__snake_case     :    List[str]=None		):
										lowerCamelCase						:Union[str, Any]						  =     data
										lowerCamelCase						:str						  =     previous
										lowerCamelCase						:Optional[int]						  =     next_node







							def __str__(				self     :    List[Any]		):
										return F"{self.data}"







							def 				snake_case  (				self     :    List[str]		):
										return self.data







							def 				snake_case  (				self     :    int		):
										return self.next







							def 				snake_case  (				self     :    str		):
										return self.previous


class   _lowerCAmelCase		:







							def __init__(				self     :    Union[str, Any]	,					__snake_case     :    Any		):
										lowerCamelCase						:str						  =     head







							def __iter__(				self     :    Union[str, Any]		):
										return self







							def 				snake_case  (				self     :    Any		):
										if not self.current:
													raise StopIteration
										else:
													lowerCamelCase						:Dict						  =     self.current.get_data()
													lowerCamelCase						:Union[str, Any]						  =     self.current.get_next()
													return value


class   _lowerCAmelCase		:







							def __init__(				self     :    str		):
										lowerCamelCase						:Optional[Any]						  =     None  # First node in list
										lowerCamelCase						:Union[str, Any]						  =     None  # Last node in list







							def __str__(				self     :    Dict		):
										lowerCamelCase						:Tuple						  =     self.head
										lowerCamelCase						:Any						  =     []
										while current is not None:
													nodes.append(current.get_data()		)
													lowerCamelCase						:Optional[Any]						  =     current.get_next()
										return " ".join(str(__snake_case		) for node in nodes		)







							def __contains__(				self     :    List[Any]	,					__snake_case     :    int		):
										lowerCamelCase						:Optional[int]						  =     self.head
										while current:
													if current.get_data() == value:
																return True
													lowerCamelCase						:Union[str, Any]						  =     current.get_next()
										return False







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







							def 				snake_case  (				self     :    Union[str, Any]		):
										if self.head:
													return self.head.get_data()
										return None







							def 				snake_case  (				self     :    List[str]		):
										if self.tail:
													return self.tail.get_data()
										return None







							def 				snake_case  (				self     :    Optional[Any]	,					__snake_case     :    Node		):
										if self.head is None:
													lowerCamelCase						:Optional[int]						  =     node
													lowerCamelCase						:Dict						  =     node
										else:
													self.insert_before_node(self.head	,					__snake_case		)







							def 				snake_case  (				self     :    List[str]	,					__snake_case     :    Node		):
										if self.head is None:
													self.set_head(__snake_case		)
										else:
													self.insert_after_node(self.tail	,					__snake_case		)







							def 				snake_case  (				self     :    int	,					__snake_case     :    int		):
										lowerCamelCase						:List[Any]						  =     Node(__snake_case		)
										if self.head is None:
													self.set_head(__snake_case		)
										else:
													self.set_tail(__snake_case		)







							def 				snake_case  (				self     :    Tuple	,					__snake_case     :    Node	,					__snake_case     :    Node		):
										lowerCamelCase						:Any						  =     node
										lowerCamelCase						:Dict						  =     node.previous

										if node.get_previous() is None:
													lowerCamelCase						:Optional[Any]						  =     node_to_insert
										else:
													lowerCamelCase						:Optional[Any]						  =     node_to_insert

										lowerCamelCase						:int						  =     node_to_insert







							def 				snake_case  (				self     :    Optional[Any]	,					__snake_case     :    Node	,					__snake_case     :    Node		):
										lowerCamelCase						:Dict						  =     node
										lowerCamelCase						:Optional[int]						  =     node.next

										if node.get_next() is None:
													lowerCamelCase						:Union[str, Any]						  =     node_to_insert
										else:
													lowerCamelCase						:Dict						  =     node_to_insert

										lowerCamelCase						:List[str]						  =     node_to_insert







							def 				snake_case  (				self     :    int	,					__snake_case     :    int	,					__snake_case     :    int		):
										lowerCamelCase						:Tuple						  =     1
										lowerCamelCase						:int						  =     Node(__snake_case		)
										lowerCamelCase						:List[Any]						  =     self.head
										while node:
													if current_position == position:
																self.insert_before_node(__snake_case	,					__snake_case		)
																return
													current_position += 1
													lowerCamelCase						:str						  =     node.next
										self.insert_after_node(self.tail	,					__snake_case		)







							def 				snake_case  (				self     :    Any	,					__snake_case     :    int		):
										lowerCamelCase						:Dict						  =     self.head
										while node:
													if node.get_data() == item:
																return node
													lowerCamelCase						:List[Any]						  =     node.get_next()
										raise Exception('''Node not found'''		)







							def 				snake_case  (				self     :    Any	,					__snake_case     :    Tuple		):
										if (node := self.get_node(__snake_case		)) is not None:
													if node == self.head:
																lowerCamelCase						:Optional[Any]						  =     self.head.get_next()

													if node == self.tail:
																lowerCamelCase						:Optional[Any]						  =     self.tail.get_previous()

													self.remove_node_pointers(__snake_case		)







							@staticmethod
							def 				snake_case  (				__snake_case     :    Node		):
										if node.get_next():
													lowerCamelCase						:Any						  =     node.previous

										if node.get_previous():
													lowerCamelCase						:Any						  =     node.next

										lowerCamelCase						:Any						  =     None
										lowerCamelCase						:Tuple						  =     None







							def 				snake_case  (				self     :    List[str]		):
										return self.head is None





def  _lowerCamelCase					(   ):
			pass


if __name__ == "__main__":
			import doctest

			doctest.testmod()




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


A__           =							{
    """configuration_nllb_moe""": [
        """NLLB_MOE_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """NllbMoeConfig""",
    ]
}

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			A__           =							[
			    """NLLB_MOE_PRETRAINED_MODEL_ARCHIVE_LIST""",
			    """NllbMoeForConditionalGeneration""",
			    """NllbMoeModel""",
			    """NllbMoePreTrainedModel""",
			    """NllbMoeTop2Router""",
			    """NllbMoeSparseMLP""",
			]


if TYPE_CHECKING:
			from .configuration_nllb_moe import (
			    NLLB_MOE_PRETRAINED_CONFIG_ARCHIVE_MAP,
			    NllbMoeConfig,
			)

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_nllb_moe import (
						    NLLB_MOE_PRETRAINED_MODEL_ARCHIVE_LIST,
						    NllbMoeForConditionalGeneration,
						    NllbMoeModel,
						    NllbMoePreTrainedModel,
						    NllbMoeSparseMLP,
						    NllbMoeTopaRouter,
						)


else:
			import sys

			A__           =							_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)



