code: def get_idb_graph():
      
      digraph = nx.DiGraph()
  
      for function in functions():
          for xref in itertools.chain(function.xrefs_from, function.xrefs_to):
              frm = _try_get_function_start(xref.frm)
              to = _try_get_function_start(xref.to)
  
              digraph.add_edge(frm, to)
  
      return digraph
docs: Export IDB to a NetworkX graph.
  
      Use xrefs to and from functions to build a DiGraph containing all
      the functions in the IDB and all the links between them.
      The graph can later be used to perform analysis on the IDB.
  
      :return: nx.DiGraph()