'Poll the server for a new message.
This method provides direct access to the messages in a
queue using a synchronous dialogue, designed for
specific types of applications where synchronous functionality
is more important than performance.
Returns:
~kombu.Message: if a message was available,
or :const:`None` otherwise.
Arguments:
no_ack (bool): If enabled the broker will
automatically ack messages.
accept (Set[str]): Custom list of accepted content types.'

def get(self, no_ack=None, accept=None):

    no_ack = (self.no_ack if (no_ack is None) else no_ack)
    message = self.channel.basic_get(queue=self.name, no_ack=no_ack)
    if (message is not None):
        m2p = getattr(self.channel, u'message_to_python', None)
        if m2p:
            message = m2p(message)
        if message.errors:
            message._reraise_error()
        message.accept = prepare_accept_content(accept)
    return message
