Timescale of environmental change modulates metabolic guild cohesion in microbial communities