code: def validate_cuts(G, s, t, solnValue, partition, capacity, flow_func):
      errmsg = f"Assertion failed in function: {flow_func.__name__}"
      assert all(n in G for n in partition[0]), errmsg
      assert all(n in G for n in partition[1]), errmsg
      cutset = compute_cutset(G, partition)
      assert all(G.has_edge(u, v) for (u, v) in cutset), errmsg
      assert solnValue == sum(
          G[u][v][capacity] for (u, v) in cutset
      ), errmsg
      H = G.copy()
      H.remove_edges_from(cutset)
      if not G.is_directed():
          assert not nx.is_connected(H), errmsg
      else:
          assert not nx.is_strongly_connected(H), errmsg
  
imports: import pytest
  import networkx
  from networkx.algorithms.flow import boykov_kolmogorov, build_flow_dict, build_residual_network, dinitz, edmonds_karp, preflow_push, shortest_augmenting_path
label_desc: Use image node_id 3 for calling a global function with example usage: validate_cuts(G, s, t, solnValue, partition, capacity, flow_func) without return types