code: def common_neighbors(G, u, v):
      """Returns the common neighbors of two nodes in a graph.
  
      Parameters
      ----------
      G : graph
          A NetworkX undirected graph.
  
      u, v : nodes
          Nodes in the graph.
  
      Returns
      -------
      cnbors : iterator
          Iterator of common neighbors of u and v in the graph.
  
      Raises
      ------
      NetworkXError
          If u or v is not a node in the graph.
  
      Examples
      --------
      >>> G = nx.complete_graph(5)
      >>> sorted(nx.common_neighbors(G, 0, 1))
      [2, 3, 4]
      """
      if u not in G:
          raise nx.NetworkXError("u is not in the graph.")
      if v not in G:
          raise nx.NetworkXError("v is not in the graph.")
  
      # Return a generator explicitly instead of yielding so that the above
      # checks are executed eagerly.
      return (w for w in G[u] if w in G[v] and w not in (u, v))
  
imports: from collections import Counter
  from itertools import chain
  import networkx
  from networkx.utils import not_implemented_for, pairwise
label_desc: Use image node_id 30 for calling a global function with example usage: common_neighbors(G, u, v) and returns: unknown