Suppose I have a DiGraph, generated by the code below:
G = nx.DiGraph() G.add_edges_from([(\'A\', \'B\'),(\'B\', \'A\'), (\'C\',\'D\'),(\'G\',\'D\')], weight=1)