code: def compute_cutset(self, G, T_orig, edge):
      T = T_orig.copy()
      T.remove_edge(*edge)
      U, V = list(nx.connected_components(T))
      cutset = set()
      for x, nbrs in ((n, G[n]) for n in U):
          cutset.update((x, y) for y in nbrs if y in V)
      return cutset
  
file_path: networkx/networkx/algorithms/flow/tests/test_gomory_hu.py
imports: from itertools import combinations
  import pytest
  import networkx
  from networkx.algorithms.flow import boykov_kolmogorov, dinitz, edmonds_karp, preflow_push, shortest_augmenting_path
label_desc: Use image node_id 2 for calling the TestGomoryHuTree obj's underlying member method code with example usage: obj.compute_cutset(G, T_orig, edge) and returns: cutset