def set_reply(self, method, value):
    if (method == RETURN):
        self._return(value)
    elif (method == YIELD):
        self._yield(value)
    elif (method == RAISE):
        self._raise(value)
    elif (method == BREAK):
        self._break(value)
    if (method & DONE):
        self.collector.remove_result(self)
def set_reply(self, method, value):
    if (method == RETURN):
        self._return(value)
    elif (method == YIELD):
        self._yield(value)
    elif (method == RAISE):
        self._raise(value)
    elif (method == BREAK):
        self._break(value)
    if (method & DONE):
        self.collector.remove_result(self)