code: public @Nonnull Optional<XQuery> parent() {
          synchronized (this) {
              if (parent.get() == null) {
                  parent.set(Optional.ofNullable(node.getParentNode()).map(XQuery::new));
              }
          }
          return parent.get();
      }
docs: Returns the parent node of this node, as {@link XQuery} object. A root node
  returns an empty optional instead.
  
  @return parent node