def METHOD_NAME(self, data=None):
    data = _ensure_execution_context(data)
    win = data['_context']
    try:
        for (context, action) in self.actions:
            if context.matches(win.executable, win.title, win.handle):
                return action.execute(data)
        # Execute the default action and return the success.
        return self.default.execute(data)
    except Exception as e:
        self._log.exception("Exception from matching context or "
                            "executing action %s: %s", self._str, e)
        return False