Achieving Diversity in the Face of Constraints: Lessons from Metabolism