'Convert the data in a ``nodelist`` into a networkx labeled directed graph.'

def nx_graph(self):

    import networkx
    nx_nodelist = list(range(1, len(self.nodes)))
    nx_edgelist = [(n, self._hd(n), self._rel(n)) for n in nx_nodelist if self._hd(n)]
    self.nx_labels = {}
    for n in nx_nodelist:
        self.nx_labels[n] = self.nodes[n][u'word']
    g = networkx.MultiDiGraph()
    g.add_nodes_from(nx_nodelist)
    g.add_edges_from(nx_edgelist)
    return g
