def inter_community_non_edges(G, partition):
 return inter_community_edges(nx.complement(G), partition)

def inter_community_non_edges ( G , partition ) : return inter_community_edges ( nx . complement ( G ) , partition )
returns the number of inter-community non-edges according to the given partition of the nodes of g .