Return all the messages represented by this object. This will convert
        the batch data into individual Message objects, which may be one
        or more if multi_messages is set to `True`.

        :rtype: list[~uamqp.message.Message]

def gather(self):
        """Return all the messages represented by this object. This will convert
        the batch data into individual Message objects, which may be one
        or more if multi_messages is set to `True`.

        :rtype: list[~uamqp.message.Message]
        """
        if self._multi_messages:
            return self._multi_message_generator()

        new_message = self._create_batch_message()
        message_size = new_message.get_message_encoded_size() + self.size_offset
        body_size = 0

        for data in self._body_gen:
            message_bytes = None
            try:
                if not data.application_properties:  # Message-like object
                    data.application_properties = self.application_properties
                message_bytes = data.encode_message()
            except AttributeError:  # raw data
                wrap_message = Message(body=data, application_properties=self.application_properties)
                message_bytes = wrap_message.encode_message()
            body_size += len(message_bytes)
            if (body_size + message_size) > self.max_message_length:
                raise ValueError(
                    "Data set too large for a single message."
                    "Set multi_messages to True to split data across multiple messages.")
            new_message._body.append(message_bytes)  # pylint: disable=protected-access
        new_message.on_send_complete = self.on_send_complete
        return [new_message]