code: def flatten(self):
      
      return PhaseGroup(
          setup=flatten_phases_and_groups(self.setup),
          main=flatten_phases_and_groups(self.main),
          teardown=flatten_phases_and_groups(self.teardown),
          name=self.name)
docs: Internally flatten out nested iterables.