code: def prettify_xml(elem):
      
      from xml.dom import minidom
      import xml.etree.cElementTree as et
  
      rough_string = et.tostring(elem, 'utf-8')
      reparsed = minidom.parseString(rough_string)
      return reparsed.toprettyxml(indent="  ")
docs: Return a pretty-printed XML string for the Element.