code: def is_directed(G):
      """Return True if graph is directed."""
      return G.is_directed()
  
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 9 for calling a global function with example usage: is_directed(G) and returns: G