docs: public static Document parseBodyFragment(String bodyHtml, String baseUri) {
          Document doc = Document.createShell(baseUri);
          Element body = doc.body();
          List<Node> nodeList = parseFragment(bodyHtml, body, baseUri);
          Node[] nodes = nodeList.toArray(new Node[0]); // the node list gets modified when re-parented
          for (int i = nodes.length - 1; i > 0; i--) {
              nodes[i].remove();
          }
          for (Node node : nodes) {
              body.appendChild(node);
          }
          return doc;
      }