docs: def tostring(self, root=None, doctype=None, pretty_print=True):
          """return the content of the XML document as a unicode string"""
          if root is None:
              root = self.root
          return etree.tounicode(
              root, doctype=doctype or self.info.doctype, pretty_print=pretty_print
          )