



'''simple docstring'''






class        SCREAMING_SNAKE_CASE:







	"""simple docstring"""






	def __init__(		self    :  int	)    ->	str:
								UpperCAmelCase				: Tuple											=	{}







	def   A			(		self    :  List[Any]	)    ->	None:
								print(self.vertex	)
								for i in self.vertex:
															print(__snake_case	,    ''' -> '''	,    ''' -> '''.join([str(__snake_case	) for j in self.vertex[i]]	)	)







	def   A			(		self    :  Optional[int]	,    __snake_case    :  int	,    __snake_case    :  int	)    ->	None:
								# check if vertex is already present,
								if from_vertex in self.vertex:
															self.vertex[from_vertex].append(__snake_case	)
								else:
															# else make a new vertex
															UpperCAmelCase				: List[str]											=	[to_vertex]







	def   A			(		self    :  Optional[Any]	)    ->	None:
								# visited array for storing already visited nodes
								UpperCAmelCase				: Union[str, Any]											=	[False] * len(self.vertex	)

								# call the recursive helper function
								for i in range(len(self.vertex	)	):
															if not visited[i]:
																						self.dfs_recursive(__snake_case	,    __snake_case	)







	def   A			(		self    :  int	,    __snake_case    :  int	,    __snake_case    :  list	)    ->	None:
								# mark start vertex as visited
								UpperCAmelCase				: Any											=	True

								print(__snake_case	,    end=''' '''	)

								# Recur for all the vertices that are adjacent to this node
								for i in self.vertex:
															if not visited[i]:
																						self.dfs_recursive(__snake_case	,    __snake_case	)


if __name__ == "__main__":
						UpperCamelCase__:     Optional[Any]										=    Graph()
						g.add_edge(0, 1)
						g.add_edge(0, 2)
						g.add_edge(1, 2)
						g.add_edge(2, 0)
						g.add_edge(2, 3)
						g.add_edge(3, 3)

						g.print_graph()
						print("DFS:")
						g.dfs()

						# OUTPUT:
						# 0  ->  1 -> 2
						# 1  ->  2
						# 2  ->  0 -> 3
						# 3  ->  3
						# DFS:
						#  0 1 2 3










'''simple docstring'''






from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCamelCase__:     Dict										=    logging.get_logger(__name__)

UpperCamelCase__:     int										=    {
    # See all MEGATRON_BERT models at https://huggingface.co/models?filter=bert
}

class        SCREAMING_SNAKE_CASE(							A__    ):







	"""simple docstring"""






	lowerCamelCase__    				= """megatron-bert"""







	def __init__(		self    :  int	,    __snake_case    :  List[Any]=29056	,    __snake_case    :  Dict=1024	,    __snake_case    :  Tuple=24	,    __snake_case    :  Any=16	,    __snake_case    :  Tuple=4096	,    __snake_case    :  int="gelu"	,    __snake_case    :  Dict=0.1	,    __snake_case    :  str=0.1	,    __snake_case    :  Optional[Any]=512	,    __snake_case    :  Tuple=2	,    __snake_case    :  Tuple=0.02	,    __snake_case    :  int=1E-12	,    __snake_case    :  Union[str, Any]=0	,    __snake_case    :  int="absolute"	,    __snake_case    :  str=True	,    **__snake_case    :  Tuple	,    )    ->	Union[str, Any]:
								super().__init__(pad_token_id=__snake_case	,    **__snake_case	)

								UpperCAmelCase				: Any											=	vocab_size
								UpperCAmelCase				: Tuple											=	hidden_size
								UpperCAmelCase				: List[Any]											=	num_hidden_layers
								UpperCAmelCase				: str											=	num_attention_heads
								UpperCAmelCase				: Optional[int]											=	hidden_act
								UpperCAmelCase				: Optional[int]											=	intermediate_size
								UpperCAmelCase				: Dict											=	hidden_dropout_prob
								UpperCAmelCase				: List[Any]											=	attention_probs_dropout_prob
								UpperCAmelCase				: Dict											=	max_position_embeddings
								UpperCAmelCase				: Any											=	type_vocab_size
								UpperCAmelCase				: str											=	initializer_range
								UpperCAmelCase				: str											=	layer_norm_eps
								UpperCAmelCase				: Optional[Any]											=	position_embedding_type
								UpperCAmelCase				: str											=	use_cache





