def _convert_xml_to_queue_messages(response, decode_function):
if response is None or response.body is None:<EOL><INDENT>return response<EOL><DEDENT>messages = list()<EOL>list_element = ETree.fromstring(response.body)<EOL>for message_element in list_element.findall('<STR_LIT>'):<EOL><INDENT>message = QueueMessage()<EOL>message.id = message_element.findtext('<STR_LIT>')<EOL>message.dequeue_count = message_element.findtext('<STR_LIT>')<EOL>message.content = decode_function(message_element.findtext('<STR_LIT>'))<EOL>message.insertion_time = parser.parse(message_element.findtext('<STR_LIT>'))<EOL>message.expiration_time = parser.parse(message_element.findtext('<STR_LIT>'))<EOL>message.pop_receipt = message_element.findtext('<STR_LIT>')<EOL>time_next_visible = message_element.find('<STR_LIT>')<EOL>if time_next_visible is not None:<EOL><INDENT>message.time_next_visible = parser.parse(time_next_visible.text)<EOL><DEDENT>messages.append(message)<EOL><DEDENT>return messages<EOL>
<?xml version="1.0" encoding="utf-8"?>
<QueueMessagesList>
    <QueueMessage>
      <MessageId>string-message-id</MessageId>
      <InsertionTime>insertion-time</InsertionTime>
      <ExpirationTime>expiration-time</ExpirationTime>
      <PopReceipt>opaque-string-receipt-data</PopReceipt>
      <TimeNextVisible>time-next-visible</TimeNextVisible>
      <DequeueCount>integer</DequeueCount>
      <MessageText>message-body</MessageText>
    </QueueMessage>
</QueueMessagesList>