code: def non_edges(graph):
      """Returns the nonexistent edges in the graph.
  
      Parameters
      ----------
      graph : NetworkX graph.
          Graph to find nonexistent edges.
  
      Returns
      -------
      non_edges : iterator
          Iterator of edges that are not in the graph.
      """
      if graph.is_directed():
          for u in graph:
              for v in non_neighbors(graph, u):
                  yield (u, v)
      else:
          nodes = set(graph)
          while nodes:
              u = nodes.pop()
              for v in nodes - set(graph[u]):
                  yield (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 29 for calling a global function with example usage: non_edges(graph) without return types