Host and symbiont jointly control gut microbiota during complete metamorphosis