def deactivate(self):
        """Remove this objective from the dependency graph and remove
        its pseudocomp from the scoping object.
        """
        if self._pseudo is not None:
            scope = self.scope
            try:
                getattr(scope, self._pseudo.name)
            except __HOLE__:
                pass
            else:
                scope.remove(self._pseudo.name)
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/hasobjective.py/Objective.deactivate