code: def edges(G, nbunch=None):
      """Returns an edge view of edges incident to nodes in nbunch.
  
      Return all edges if nbunch is unspecified or nbunch=None.
  
      For digraphs, edges=out_edges
  
      This function wraps the :func:`G.edges <networkx.Graph.edges>` property.
      """
      return G.edges(nbunch)
  
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 2 for calling a global function with example usage: edges(G, nbunch) and returns: G