Generate graphs from a stochastic block model.