Universality of the stochastic block model