'Remove any builtins which might have been added by add_builtins, or
restore overwritten ones to their previous values.'

def deactivate(self):

    remove_builtin = self.remove_builtin
    for (key, val) in self._orig_builtins.items():
        remove_builtin(key, val)
    self._orig_builtins.clear()
    self._builtins_added = False
