def set_order(self, new_order):

        # Make sure the new_order is valid. It must contain all subsystems
        # in this model.
        newset = set(new_order)
        oldset = set(self._subsystems)
        if oldset != newset:
            missing = oldset - newset
            extra = newset - oldset

            msg = "Unexpected new order. "
            if len(missing) > 0:
                msg += "The following are missing: %s. " % list(missing)
            if len(extra) > 0:
                msg += "The following are extra: %s. " % list(extra)

            raise ValueError(msg)

        # Don't allow duplicates either.
        if len(newset) < len(new_order):
            dupes = [key for key, val in iteritems(Counter(new_order)) if val>1]
            msg = "Duplicate name(s) found in order list: %s" % dupes
            raise ValueError(msg)

        new_subs = OrderedDict()
        for sub in new_order:
            new_subs[sub] = self._subsystems[sub]

        self._subsystems = new_subs

        # reset locals
        self._local_subsystems = [s for s in self._local_subsystems
                                      if s.name in newset]

        self._order_set = True
Specifies a new execution order for this system. This should only
dataset/ETHPy150Open OpenMDAO/OpenMDAO/openmdao/core/group.py/Group.set_order