Fix tests for change in NetworkX 2.4
NetworkX deprecated G.node
in favor of G.nodes
long time ago and they finally dropped the backward compatible version in 2.4 (the version used in LCG 101).
This change is backward compatible with NetworkX >= 2.1 (LCG 100 comes with 2.3).