import time
for n in [20, 200, 2000]:
    G = nx.fast_gnp_random_graph(n, 5.0 / n)
current_time = time.time()
a = nx.betweenness_centrality(G)
Networkx never finishes calculating Betweenness centrality for 2 mil nodes