'Converts this transform graph into a networkx graph.
.. note::
You must have the `networkx <http://networkx.lanl.gov/>`_
package installed for this to work.
Returns
nxgraph : `networkx.Graph <http://networkx.lanl.gov/reference/classes.graph.html>`_
This `TransformGraph` as a `networkx.Graph`_.'

def to_networkx_graph(self):

    import networkx as nx
    nxgraph = nx.Graph()
    for a in self._graph:
        if (a not in nxgraph):
            nxgraph.add_node(a)
        for b in self._graph[a]:
            if (b not in nxgraph):
                nxgraph.add_node(b)
    for a in self._graph:
        agraph = self._graph[a]
        for b in agraph:
            transform = agraph[b]
            pri = (transform.priority if hasattr(transform, u'priority') else 1)
            color = trans_to_color[transform.__class__]
            nxgraph.add_edge(a, b, weight=pri, color=color)
    return nxgraph
