


'''simple docstring'''






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


__A	:	int     =     logging.get_logger(__name__)

__A	:	str     =     {'openai-gpt': 'https://huggingface.co/openai-gpt/resolve/main/config.json'}
class 						__UpperCamelCase	(						lowercase__							):
							lowercase			:		int   		=  'openai-gpt'
							lowercase			:		str   		=  {
							    'max_position_embeddings': 'n_positions',
							    'hidden_size': 'n_embd',
							    'num_attention_heads': 'n_head',
							    'num_hidden_layers': 'n_layer',
							}





							def __init__(  self		:List[Any]  ,_UpperCamelCase		:List[Any]=4_0_4_7_8  ,_UpperCamelCase		:str=5_1_2  ,_UpperCamelCase		:Dict=7_6_8  ,_UpperCamelCase		:Dict=1_2  ,_UpperCamelCase		:Any=1_2  ,_UpperCamelCase		:Tuple="gelu"  ,_UpperCamelCase		:Optional[int]=0.1  ,_UpperCamelCase		:Dict=0.1  ,_UpperCamelCase		:Optional[int]=0.1  ,_UpperCamelCase		:Optional[Any]=1E-5  ,_UpperCamelCase		:List[Any]=0.02  ,_UpperCamelCase		:int="cls_index"  ,_UpperCamelCase		:Union[str, Any]=True  ,_UpperCamelCase		:List[str]=None  ,_UpperCamelCase		:Any=True  ,_UpperCamelCase		:Dict=0.1  ,**_UpperCamelCase		:str  ,):
									snake_case_		:							Dict			       =						vocab_size
									snake_case_		:							int			       =						n_positions
									snake_case_		:							Tuple			       =						n_embd
									snake_case_		:							List[Any]			       =						n_layer
									snake_case_		:							Dict			       =						n_head
									snake_case_		:							Optional[int]			       =						afn
									snake_case_		:							List[Any]			       =						resid_pdrop
									snake_case_		:							int			       =						embd_pdrop
									snake_case_		:							Optional[Any]			       =						attn_pdrop
									snake_case_		:							Any			       =						layer_norm_epsilon
									snake_case_		:							str			       =						initializer_range
									snake_case_		:							Dict			       =						summary_type
									snake_case_		:							Optional[Any]			       =						summary_use_proj
									snake_case_		:							List[str]			       =						summary_activation
									snake_case_		:							Tuple			       =						summary_first_dropout
									snake_case_		:							List[Any]			       =						summary_proj_to_labels
									super().__init__(**_UpperCamelCase			)



'''simple docstring'''






def      UpperCAmelCase      (		lowerCamelCase_  :Tuple				,      lowerCamelCase_  :Optional[Any]				,      lowerCamelCase_  :str				,      lowerCamelCase_  :str ):







		'''simple docstring'''
		# Return True if there is node that has not iterated.
		snake_case_		:							Optional[int]			       =						[False] * len(lowerCamelCase_ )
		snake_case_		:							Dict			       =						[]
		queue.append(lowerCamelCase_ )
		snake_case_		:							Tuple			       =						True

		while queue:
				snake_case_		:							Union[str, Any]			       =						queue.pop(0 )
				for ind in range(len(graph[u] ) ):
						if visited[ind] is False and graph[u][ind] > 0:
								queue.append(lowerCamelCase_ )
								snake_case_		:							str			       =						True
								snake_case_		:							Optional[Any]			       =						u

		return visited[t]





def      UpperCAmelCase      (		lowerCamelCase_  :Optional[Any]				,      lowerCamelCase_  :Dict				,      lowerCamelCase_  :Union[str, Any] ):







		'''simple docstring'''
		# This array is filled by BFS and to store path
		snake_case_		:							Optional[int]			       =						[-1] * (len(lowerCamelCase_ ))
		snake_case_		:							Tuple			       =						0
		while bfs(lowerCamelCase_				,      lowerCamelCase_				,      lowerCamelCase_				,      lowerCamelCase_ ):
				snake_case_		:							int			       =						float("""Inf""" )
				snake_case_		:							Any			       =						sink

				while s != source:
						# Find the minimum value in select path
						snake_case_		:							Optional[Any]			       =						min(lowerCamelCase_				,      graph[parent[s]][s] )
						snake_case_		:							Union[str, Any]			       =						parent[s]

				max_flow += path_flow
				snake_case_		:							Dict			       =						sink

				while v != source:
						snake_case_		:							Optional[int]			       =						parent[v]
						graph[u][v] -= path_flow
						graph[v][u] += path_flow
						snake_case_		:							Any			       =						parent[v]
		return max_flow


__A	:	Union[str, Any]     =     [
    [0, 16, 13, 0, 0, 0],
    [0, 0, 10, 12, 0, 0],
    [0, 4, 0, 0, 14, 0],
    [0, 0, 9, 0, 0, 20],
    [0, 0, 0, 7, 0, 4],
    [0, 0, 0, 0, 0, 0],
]

__A,   __A	:	Union[str, Any]     =     0, 5






print(ford_fulkerson(graph, source, sink))