docs: def render(file):
      """Pretty print the XML file for rendering."""
      with file.open() as fp:
          encoding = detect_encoding(fp, default='utf-8')
          file_content = fp.read().decode(encoding)
          parsed_xml = xml.dom.minidom.parseString(file_content)
          return parsed_xml.toprettyxml(indent='  ', newl='')