Star formation quenching in galaxies