code: def xmllint_format(xml):
      
      parser = ET.XMLParser(resolve_entities=False, strip_cdata=False, remove_blank_text=True)
      document = ET.fromstring(xml, parser)
      return ('%s\n%s' % ('<?xml version="1.0" encoding="UTF-8"?>', ET.tostring(document, pretty_print=True).decode('utf-8'))).encode('utf-8')
docs: Pretty-print XML like ``xmllint`` does.
  
      Arguments:
          xml (string): Serialized XML