'Dispatch and execute the command.
Look-up order is: :attr:`builtins` -> :attr:`amqp`.'

def dispatch(self, cmd, arglist):

    if isinstance(arglist, string_t):
        arglist = shlex.split(safe_str(arglist))
    if (cmd in self.builtins):
        return getattr(self, self.builtins[cmd])(*arglist)
    (fun, args, formatter) = self.get_amqp_api_command(cmd, arglist)
    return formatter(fun(*args))
