


"""simple docstring"""






class      lowerCamelCase__   :







					"""simple docstring"""


					def __init__(       self    : Optional[int] ,       UpperCamelCase    : int ,       UpperCamelCase    : Dict=None ,       UpperCamelCase    : List[str]=None  ):
												'''simple docstring'''






												__UpperCAmelCase   :						Dict      							=					data
												__UpperCAmelCase   :						List[str]      							=					previous
												__UpperCAmelCase   :						Any      							=					next_node






					def __str__(       self    : List[str]  ):
												'''simple docstring'''






												return f'''{self.data}'''






					def lowerCamelCase__							(       self    : List[str]  ):
												'''simple docstring'''






												return self.data






					def lowerCamelCase__							(       self    : Dict  ):
												'''simple docstring'''






												return self.next






					def lowerCamelCase__							(       self    : List[str]  ):
												'''simple docstring'''






												return self.previous






class      lowerCamelCase__   :







					"""simple docstring"""


					def __init__(       self    : Optional[int] ,       UpperCamelCase    : Tuple  ):
												'''simple docstring'''






												__UpperCAmelCase   :						List[Any]      							=					head






					def __iter__(       self    : Any  ):
												'''simple docstring'''






												return self






					def lowerCamelCase__							(       self    : Any  ):
												'''simple docstring'''






												if not self.current:
																			raise StopIteration
												else:
																			__UpperCAmelCase   :						List[Any]      							=					self.current.get_data()
																			__UpperCAmelCase   :						int      							=					self.current.get_next()
																			return value






class      lowerCamelCase__   :







					"""simple docstring"""


					def __init__(       self    : List[str]  ):
												'''simple docstring'''






												__UpperCAmelCase   :						int      							=					None  # First node in list
												__UpperCAmelCase   :						Union[str, Any]      							=					None  # Last node in list






					def __str__(       self    : List[Any]  ):
												'''simple docstring'''






												__UpperCAmelCase   :						Optional[int]      							=					self.head
												__UpperCAmelCase   :						str      							=					[]
												while current is not None:
																			nodes.append(current.get_data()  )
																			__UpperCAmelCase   :						List[Any]      							=					current.get_next()
												return " ".join(str(_a  ) for node in nodes  )






					def __contains__(       self    : str ,       UpperCamelCase    : Union[str, Any]  ):
												'''simple docstring'''






												__UpperCAmelCase   :						List[str]      							=					self.head
												while current:
																			if current.get_data() == value:
																										return True
																			__UpperCAmelCase   :						str      							=					current.get_next()
												return False






					def __iter__(       self    : List[Any]  ):
												'''simple docstring'''






												return LinkedListIterator(self.head  )






					def lowerCamelCase__							(       self    : List[str]  ):
												'''simple docstring'''






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






					def lowerCamelCase__							(       self    : List[Any]  ):
												'''simple docstring'''






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






					def lowerCamelCase__							(       self    : Tuple ,       UpperCamelCase    : Union[str, Any]  ):
												'''simple docstring'''






												if self.head is None:
																			__UpperCAmelCase   :						str      							=					node
																			__UpperCAmelCase   :						int      							=					node
												else:
																			self.insert_before_node(self.head ,       _a  )






					def lowerCamelCase__							(       self    : Tuple ,       UpperCamelCase    : Any  ):
												'''simple docstring'''






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






					def lowerCamelCase__							(       self    : Any ,       UpperCamelCase    : Optional[int]  ):
												'''simple docstring'''






												__UpperCAmelCase   :						List[str]      							=					Node(_a  )
												if self.head is None:
																			self.set_head(_a  )
												else:
																			self.set_tail(_a  )






					def lowerCamelCase__							(       self    : Optional[Any] ,       UpperCamelCase    : str ,       UpperCamelCase    : Dict  ):
												'''simple docstring'''






												__UpperCAmelCase   :						Tuple      							=					node
												__UpperCAmelCase   :						str      							=					node.previous

												if node.get_previous() is None:
																			__UpperCAmelCase   :						Dict      							=					node_to_insert
												else:
																			__UpperCAmelCase   :						str      							=					node_to_insert

												__UpperCAmelCase   :						str      							=					node_to_insert






					def lowerCamelCase__							(       self    : str ,       UpperCamelCase    : str ,       UpperCamelCase    : Union[str, Any]  ):
												'''simple docstring'''






												__UpperCAmelCase   :						List[Any]      							=					node
												__UpperCAmelCase   :						Tuple      							=					node.next

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

												__UpperCAmelCase   :						int      							=					node_to_insert






					def lowerCamelCase__							(       self    : Union[str, Any] ,       UpperCamelCase    : Optional[Any] ,       UpperCamelCase    : List[Any]  ):
												'''simple docstring'''






												__UpperCAmelCase   :						str      							=					1
												__UpperCAmelCase   :						str      							=					Node(_a  )
												__UpperCAmelCase   :						str      							=					self.head
												while node:
																			if current_position == position:
																										self.insert_before_node(_a ,       _a  )
																										return
																			current_position += 1
																			__UpperCAmelCase   :						Optional[int]      							=					node.next
												self.insert_after_node(self.tail ,       _a  )






					def lowerCamelCase__							(       self    : Any ,       UpperCamelCase    : List[Any]  ):
												'''simple docstring'''






												__UpperCAmelCase   :						Union[str, Any]      							=					self.head
												while node:
																			if node.get_data() == item:
																										return node
																			__UpperCAmelCase   :						Any      							=					node.get_next()
												raise Exception("""Node not found"""  )






					def lowerCamelCase__							(       self    : Union[str, Any] ,       UpperCamelCase    : Tuple  ):
												'''simple docstring'''






												if (node := self.get_node(_a  )) is not None:
																			if node == self.head:
																										__UpperCAmelCase   :						List[str]      							=					self.head.get_next()

																			if node == self.tail:
																										__UpperCAmelCase   :						int      							=					self.tail.get_previous()

																			self.remove_node_pointers(_a  )






					@staticmethod
					def lowerCamelCase__							(       UpperCamelCase    : List[Any]  ):
												'''simple docstring'''






												if node.get_next():
																			__UpperCAmelCase   :						Dict      							=					node.previous

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

												__UpperCAmelCase   :						int      							=					None
												__UpperCAmelCase   :						Tuple      							=					None






					def lowerCamelCase__							(       self    : Optional[int]  ):
												'''simple docstring'''






												return self.head is None






def      lowerCamelCase       (     )		->       None:

							'''simple docstring'''







if __name__ == "__main__":
							import doctest

							doctest.testmod()


from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


snake_case :		Dict							      =  logging.get_logger(__name__)

snake_case :		List[Any]							      =  {
    "YituTech/conv-bert-base": "https://huggingface.co/YituTech/conv-bert-base/resolve/main/config.json",
    "YituTech/conv-bert-medium-small": (
        "https://huggingface.co/YituTech/conv-bert-medium-small/resolve/main/config.json"
    ),
    "YituTech/conv-bert-small": "https://huggingface.co/YituTech/conv-bert-small/resolve/main/config.json",
    # See all ConvBERT models at https://huggingface.co/models?filter=convbert
}





class       _snake_case					(     snake_case				):
			UpperCamelCase__          =    'convbert'







			def __init__(				self						,   _a=30_522						,   _a=768						,   _a=12						,   _a=12						,   _a=3_072						,   _a="gelu"						,   _a=0.1						,   _a=0.1						,   _a=512						,   _a=2						,   _a=0.02						,   _a=1e-12						,   _a=1						,   _a=0						,   _a=2						,   _a=768						,   _a=2						,   _a=9						,   _a=1						,   _a=None						,   **_a						,   ):
				super().__init__(
				    pad_token_id=_a						,   bos_token_id=_a						,   eos_token_id=_a						,   **_a						,   )

				__magic_name__		:		Tuple	   =     vocab_size
				__magic_name__		:		List[Any]	   =     hidden_size
				__magic_name__		:		Union[str, Any]	   =     num_hidden_layers
				__magic_name__		:		List[Any]	   =     num_attention_heads
				__magic_name__		:		str	   =     intermediate_size
				__magic_name__		:		Any	   =     hidden_act
				__magic_name__		:		List[Any]	   =     hidden_dropout_prob
				__magic_name__		:		Optional[int]	   =     attention_probs_dropout_prob
				__magic_name__		:		Tuple	   =     max_position_embeddings
				__magic_name__		:		str	   =     type_vocab_size
				__magic_name__		:		List[str]	   =     initializer_range
				__magic_name__		:		Tuple	   =     layer_norm_eps
				__magic_name__		:		List[Any]	   =     embedding_size
				__magic_name__		:		List[Any]	   =     head_ratio
				__magic_name__		:		str	   =     conv_kernel_size
				__magic_name__		:		Dict	   =     num_groups
				__magic_name__		:		str	   =     classifier_dropout







class       _snake_case					(     snake_case				):







			@property
			def 			SCREAMING_SNAKE_CASE    (				self		):
				if self.task == "multiple-choice":
					__magic_name__		:		Dict	   =     {0: "batch", 1: "choice", 2: "sequence"}
				else:
					__magic_name__		:		Dict	   =     {0: "batch", 1: "sequence"}
				return OrderedDict(
				    [
				        ("input_ids", dynamic_axis),
				        ("attention_mask", dynamic_axis),
				        ("token_type_ids", dynamic_axis),
				    ]		)
