Migrate to Networkx graphs.