Remove unused networkx dependency.