'Make an RPC call for the given callback, channel number and method.
acceptable_replies lists out what responses we\'ll process from the
server with the specified callback.
:param int channel_number: The channel number for the RPC call
:param pika.amqp_object.Method method: The method frame to call
:param method callback_method: The callback for the RPC response
:param list acceptable_replies: The replies this RPC call expects'

def _rpc(self, channel_number, method, callback_method=None, acceptable_replies=None):

    if (acceptable_replies and (not isinstance(acceptable_replies, list))):
        raise TypeError('acceptable_replies    should    be    list    or    None')
    if callback_method:
        if (not utils.is_callable(callback_method)):
            raise TypeError('callback    should    be    None,    function    or    method.')
        for reply in acceptable_replies:
            self.callbacks.add(channel_number, reply, callback_method)
    self._send_method(channel_number, method)
