Make networkx a dependency