def METHOD_NAME(queue, max_number, wait_time):
    """
    Receive a batch of messages in a single request from an SQS queue.
    :param queue: The queue from which to receive messages.
    :param max_number: The maximum number of messages to receive. The actual number
                       of messages received might be less.
    :param wait_time: The maximum time to wait (in seconds) before returning. When
                      this number is greater than zero, long polling is used. This
                      can result in reduced costs and fewer false empty responses.
    :return: The list of Message objects received. These each contain the body
             of the message and metadata and custom attributes.
    """
    try:
        messages = queue.METHOD_NAME(
            MessageAttributeNames=["All"],
            MaxNumberOfMessages=max_number,
            WaitTimeSeconds=wait_time,
        )
        processed_messages = []
        for msg in messages:
            receipt = consume_message(msg)
            if receipt:
                processed_messages.append(receipt)
        # delete the successfully consumed messages
        delete_messages(queue, processed_messages)
    except Exception as error:
        log.error("Couldn't receive messages from queue: %s", queue)
        raise error
    else:
        return messages