docs: def tostring(node, indent=4, nsmap=None):
      """
      Convert a node into an XML string by using the StreamingXMLWriter.
      This is useful for testing purposes.
  
      :param node: a node object (typically an ElementTree object)
      :param indent: the indentation to use in the XML (default 4 spaces)
      """
      out = io.BytesIO()
      writer = StreamingXMLWriter(out, indent, nsmap=nsmap)
      writer.serialize(node)
      return out.getvalue()