A class of network models recoverable by spectral clustering