code: def tostring(self, fully_qualified=True, pretty_print=True, encoding="UTF-8"):
          
          root = self.serialize(fully_qualified=fully_qualified)
          kwargs = {"pretty_print": pretty_print, "encoding": encoding}
          if encoding != "unicode":
              kwargs["xml_declaration"] = True
          return etree.tostring(root, **kwargs)
docs: Serialize and return a string of this METS document.
  
          To write to file, see :meth:`write`.
  
          The default encoding is ``UTF-8``. This method will return a unicode
          string when ``encoding`` is set to ``unicode``.
  
          :return: String of this document