docs: static final void cleanup(XMLStreamReader reader) throws XMLStreamException {
      if (reader.nextTag() != END_ELEMENT || !reader.getLocalName().equalsIgnoreCase(SPARQL.name())) {
        logger.warn("Extra data at end of results");
      } else if (reader.next() != END_DOCUMENT) {
        logger.warn("Unexpected data after XML");
      }
      logger.debug("End of input detected, closing reader...");
      reader.close();
    }