def METHOD_NAME(self):
    if not self.future.set_running_or_notify_cancel():  # pragma: no cover
        return
    try:
        result = self.fn(*self.args, **self.kwargs)
    except BaseException as e:
        self.future.set_exception(e)
    else:
        self.future.set_result(result)