code: def dfs(
      capacity, flow, visit, vertices, idx, sink, current_flow=1 << 63
  ):
      """
      Depth First Search implementation for Ford-Fulkerson algorithm.
      """
  
      # DFS function for ford_fulkerson algorithm.
      if idx == sink:
          return current_flow
      visit[idx] = True
      for nxt in range(vertices):
          if not visit[nxt] and flow[idx][nxt] < capacity[idx][nxt]:
              available_flow = min(
                  current_flow, capacity[idx][nxt] - flow[idx][nxt]
              )
              tmp = dfs(
                  capacity,
                  flow,
                  visit,
                  vertices,
                  nxt,
                  sink,
                  available_flow,
              )
              if tmp:
                  flow[idx][nxt] += tmp
                  flow[nxt][idx] -= tmp
                  return tmp
      return 0
  
imports: from queue import Queue
label_desc: Use image node_id 1 for calling a global function with example usage: dfs(capacity, flow, visit, vertices, idx, sink, current_flow) and returns: int, current_flow, tmp