Controlled Training Data Generation with Diffusion Models