Modeling microbial consortiums as distributed metabolic networks