def wrapped(meth, channel):

    def _(self, *args, **kwargs):
        reply = kwargs.pop('reply', False)
        timeout = kwargs.pop('timeout', None)
        msg_id = meth(self, *args, **kwargs)
        if (not reply):
            return msg_id
        return self._async_recv_reply(msg_id, timeout=timeout, channel=channel)
    return _
def wrapped(meth, channel):

    def _(self, *args, **kwargs):
        reply = kwargs.pop('reply', False)
        timeout = kwargs.pop('timeout', None)
        msg_id = meth(self, *args, **kwargs)
        if (not reply):
            return msg_id
        return self._async_recv_reply(msg_id, timeout=timeout, channel=channel)
    return _