'Get AMQP command wrapper.
With a command name and a list of arguments, convert the arguments
to Python values and find the corresponding method on the AMQP channel
object.
Returns:
Tuple: of `(method, processed_args)` pairs.'

def get_amqp_api_command(self, cmd, arglist):

    spec = self.amqp[cmd]
    args = spec.str_args_to_python(arglist)
    attr_name = cmd.replace(u'.', u'_')
    if self.needs_reconnect:
        self._reconnect()
    return (getattr(self.chan, attr_name), args, spec.format_response)
