<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_idb_graph():
 """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() """

    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