docs: public Node replaceNode(Closure c) {
          if (parent() == null) {
              throw new UnsupportedOperationException("Replacing the root node is not supported");
          }
          appendNodes(c);
          getParentList(parent()).remove(this);
          this.setParent(null);
          return this;
      }