code: def _convert_queue_message_xml(message_text, encode_function, key_encryption_key):
      '''
      <?xml version="1.0" encoding="utf-8"?>
      <QueueMessage>
          <MessageText></MessageText>
      </QueueMessage>
      '''
      queue_message_element = ETree.Element('QueueMessage')
  
      # Enabled
      message_text = encode_function(message_text)
      if key_encryption_key is not None:
          message_text = _encrypt_queue_message(message_text, key_encryption_key)
      ETree.SubElement(queue_message_element, 'MessageText').text = message_text
  
      # Add xml declaration and serialize
      try:
          stream = BytesIO()
          ETree.ElementTree(queue_message_element).write(stream, xml_declaration=True, encoding='utf-8', method='xml')
          output = stream.getvalue()
      finally:
          stream.close()
  
      return outpuf _convert_queue_message_xml(message_text, encode_function, key_encryption_key):
      '''
      <?xml version="1.0" encoding="utf-8"?>
      <QueueMessage>
          <MessageText></MessageText>
      </QueueMessage>
      '''
      queue_message_element = ETree.Element('QueueMessage')
  
      # Enabled
      message_text = encode_function(message_text)
      if key_encryption_key is not None:
          message_text = _encrypt_queue_message(message_text, key_encryption_key)
      ETree.SubElement(queue_message_element, 'MessageText').text = message_text
  
      # Add xml declaration and serialize
      try:
          stream = BytesIO()
          ETree.ElementTree(queue_message_element).write(stream, xml_declaration=True, encoding='utf-8', method='xml')
          output = stream.getvalue()
      finally:
          stream.close()
  
      return output
docs: <?xml version="1.0" encoding="utf-8"?>
      <QueueMessage>
          <MessageText></MessageText>
      </QueueMessage>