def _surrogate_updated(self, obj, name, old, new):
        """Called when self.surrogates Dict is updated."""

        all_changes = new.changed.keys() + new.added.keys() + \
                      new.removed.keys()

        for varname in all_changes:
            surr = self.surrogates.get(varname)
            if surr is None:
                if self.default_surrogate:
                    def_surr = deepcopy(self.default_surrogate)
                    self._default_surrogate_copies[varname] = def_surr
                    self._update_var_for_surrogate(def_surr, varname)
                if varname in self._surrogate_overrides:
                    self._surrogate_overrides.remove(varname)
            else:
                self._surrogate_overrides.add(varname)
                if self._default_surrogate_copies in name:
                    del self._default_surrogate_copies[name]

                self._update_var_for_surrogate(surr, varname)

        self.config_changed()
        self._train = True
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.lib/src/openmdao/lib/components/metamodel.py/MetaModel._surrogate_updated/swapped operands of `in`