On the universality of the stochastic block model