


"""simple docstring"""







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


__lowercase    					=      logging.get_logger(__name__)

__lowercase    					=      {
    """unc-nlp/lxmert-base-uncased""": """https://huggingface.co/unc-nlp/lxmert-base-uncased/resolve/main/config.json""",
}






class 						_A  (  _a  ):







    """simple docstring"""




    UpperCAmelCase       :							Optional[Any]	=       """lxmert"""
    UpperCAmelCase       :							str	=       {}






    def __init__(					self				:    int				, __UpperCAmelCase				:    List[str]=30522				, __UpperCAmelCase				:    Optional[Any]=768				, __UpperCAmelCase				:    str=12				, __UpperCAmelCase				:    List[Any]=9500				, __UpperCAmelCase				:    Dict=1600				, __UpperCAmelCase				:    Tuple=400				, __UpperCAmelCase				:    List[str]=3072				, __UpperCAmelCase				:    Tuple="gelu"				, __UpperCAmelCase				:    str=0.1				, __UpperCAmelCase				:    Any=0.1				, __UpperCAmelCase				:    Union[str, Any]=512				, __UpperCAmelCase				:    Dict=2				, __UpperCAmelCase				:    List[str]=0.02				, __UpperCAmelCase				:    List[str]=1e-12				, __UpperCAmelCase				:    Optional[int]=9				, __UpperCAmelCase				:    List[str]=5				, __UpperCAmelCase				:    Dict=5				, __UpperCAmelCase				:    List[str]=2048				, __UpperCAmelCase				:    List[Any]=4				, __UpperCAmelCase				:    Tuple=6.67				, __UpperCAmelCase				:    Optional[int]=True				, __UpperCAmelCase				:    int=True				, __UpperCAmelCase				:    Optional[int]=True				, __UpperCAmelCase				:    Optional[Any]=True				, __UpperCAmelCase				:    List[Any]=True				, __UpperCAmelCase				:    Optional[Any]=True				, __UpperCAmelCase				:    Optional[int]=True				, **__UpperCAmelCase				:    str				, ):
      a						:		Tuple      							=			vocab_size
      a						:		Optional[Any]      							=			hidden_size
      a						:		List[str]      							=			num_attention_heads
      a						:		int      							=			hidden_act
      a						:		Dict      							=			intermediate_size
      a						:		Optional[Any]      							=			hidden_dropout_prob
      a						:		Tuple      							=			attention_probs_dropout_prob
      a						:		str      							=			max_position_embeddings
      a						:		Optional[int]      							=			type_vocab_size
      a						:		str      							=			initializer_range
      a						:		Tuple      							=			layer_norm_eps
      a						:		Any      							=			num_qa_labels
      a						:		str      							=			num_object_labels
      a						:		Any      							=			num_attr_labels
      a						:		Union[str, Any]      							=			l_layers
      a						:		int      							=			x_layers
      a						:		str      							=			r_layers
      a						:		Dict      							=			visual_feat_dim
      a						:		int      							=			visual_pos_dim
      a						:		Optional[int]      							=			visual_loss_normalizer
      a						:		Any      							=			task_matched
      a						:		Optional[int]      							=			task_mask_lm
      a						:		Union[str, Any]      							=			task_obj_predict
      a						:		List[str]      							=			task_qa
      a						:		Any      							=			visual_obj_loss
      a						:		Union[str, Any]      							=			visual_attr_loss
      a						:		int      							=			visual_feat_loss
      a						:		int      							=			{"vision": r_layers, "cross_encoder": x_layers, "language": l_layers}
      super().__init__(**__UpperCAmelCase)









def 			A_      (    _UpperCAmelCase    ):
						SCREAMING_SNAKE_CASE_: List[str]  		=       [0] * len(_UpperCAmelCase    )
						SCREAMING_SNAKE_CASE_: List[Any]  		=       []
						SCREAMING_SNAKE_CASE_: str  		=       []
						SCREAMING_SNAKE_CASE_: List[str]  		=       0

						for values in graph.values():
												for i in values:
																		indegree[i] += 1

						for i in range(len(_UpperCAmelCase    )    ):
												if indegree[i] == 0:
																		queue.append(_UpperCAmelCase    )

						while queue:
												SCREAMING_SNAKE_CASE_: Optional[int]  		=       queue.pop(0    )
												cnt += 1
												topo.append(_UpperCAmelCase    )
												for x in graph[vertex]:
																		indegree[x] -= 1
																		if indegree[x] == 0:
																								queue.append(_UpperCAmelCase    )

						if cnt != len(_UpperCAmelCase    ):
												print("Cycle exists"    )
						else:
												print(_UpperCAmelCase    )


# Adjacency List of Graph
lowerCAmelCase							:  Any   	=						{0: [1, 2], 1: [3], 2: [3], 3: [4, 5], 4: [], 5: []}



topological_sort(graph)






