code: def _is_separating_set(G, cut):
      """Assumes that the input graph is connected"""
      if len(cut) == len(G) - 1:
          return True
  
      H = nx.restricted_view(G, cut, [])
      if nx.is_connected(H):
          return False
      return True
  
file_path: networkx/networkx/algorithms/connectivity/kcutsets.py
imports: import copy
  from collections import defaultdict
  from itertools import combinations
  from operator import itemgetter
  import networkx
  from networkx.algorithms.flow import build_residual_network, edmonds_karp, shortest_augmenting_path
  from .utils import build_auxiliary_node_connectivity
label_desc: Use image node_id 2 for calling a global function with example usage: _is_separating_set(G, cut) and returns: True, True, False