code: def is_independent_set(G, nodes):
      """Returns True if and only if `nodes` is a clique in `G`.
  
      `G` is a NetworkX graph. `nodes` is an iterable of nodes in
      `G`.
  
      """
      return G.subgraph(nodes).number_of_edges() == 0
  
file_path: networkx/networkx/algorithms/approximation/tests/test_clique.py
imports: import networkx
  from networkx.algorithms.approximation import clique_removal, large_clique_size, max_clique, maximum_independent_set
label_desc: Use image node_id 1 for calling a global function with example usage: is_independent_set(G, nodes) and returns: unknown