networkx.gnm_random_graph modified like sb_network_measurements.py