docs: private Long storeTree(MtasTreeNode<?> node, boolean isSinglePoint,
        boolean storeAdditionalInformation, IndexOutput out,
        Long nodeRefApproxOffset, long refApproxOffset) throws IOException {
      Long localNodeRefApproxOffset = nodeRefApproxOffset;
      if (node != null) {
        Boolean isRoot = false;
        if (localNodeRefApproxOffset == null) {
          localNodeRefApproxOffset = out.getFilePointer();
          isRoot = true;
        }
        Long fpIndexObjectPositionLeftChild;
        Long fpIndexObjectPositionRightChild;
        if (node.leftChild != null) {
          fpIndexObjectPositionLeftChild = storeTree(node.leftChild,
              isSinglePoint, storeAdditionalInformation, out,
              localNodeRefApproxOffset, refApproxOffset);
        } else {
          fpIndexObjectPositionLeftChild = (long) 0; // tmp
        }
        if (node.rightChild != null) {
          fpIndexObjectPositionRightChild = storeTree(node.rightChild,
              isSinglePoint, storeAdditionalInformation, out,
              localNodeRefApproxOffset, refApproxOffset);
        } else {
          fpIndexObjectPositionRightChild = (long) 0; // tmp
        }
        Long fpIndexObjectPosition = out.getFilePointer();
        if (node.leftChild == null) {
          fpIndexObjectPositionLeftChild = fpIndexObjectPosition;
        }
        if (node.rightChild == null) {
          fpIndexObjectPositionRightChild = fpIndexObjectPosition;
        }
        if (isRoot) {
          assert localNodeRefApproxOffset >= 0 : "nodeRefApproxOffset < 0 : "
              + localNodeRefApproxOffset;
          out.writeVLong(localNodeRefApproxOffset);
          byte flag = 0;
          if (isSinglePoint) {
            flag |= MtasTree.SINGLE_POSITION_TREE;
          }
          if (storeAdditionalInformation) {
            flag |= MtasTree.STORE_ADDITIONAL_ID;
          }
          out.writeByte(flag);
        }
        assert node.left >= 0 : "node.left < 0 : " + node.left;
        out.writeVInt(node.left);
        assert node.right >= 0 : "node.right < 0 : " + node.right;
        out.writeVInt(node.right);
        assert node.max >= 0 : "node.max < 0 : " + node.max;
        out.writeVInt(node.max);
        assert fpIndexObjectPositionLeftChild >= localNodeRefApproxOffset : "fpIndexObjectPositionLeftChild<nodeRefApproxOffset : "
            + fpIndexObjectPositionLeftChild + " and " + localNodeRefApproxOffset;
        out.writeVLong(
            (fpIndexObjectPositionLeftChild - localNodeRefApproxOffset));
        assert fpIndexObjectPositionRightChild >= localNodeRefApproxOffset : "fpIndexObjectPositionRightChild<nodeRefApproxOffset"
            + fpIndexObjectPositionRightChild + " and "
            + localNodeRefApproxOffset;
        out.writeVLong(
            (fpIndexObjectPositionRightChild - localNodeRefApproxOffset));
        if (!isSinglePoint) {
          out.writeVInt(node.ids.size());
        }
        HashMap<Integer, MtasTreeNodeId> ids = node.ids;
        Long objectRefCorrected;
        long objectRefCorrectedPrevious = 0;
        // sort refs
        List<MtasTreeNodeId> nodeIds = new ArrayList<>(ids.values());
        Collections.sort(nodeIds);
        if (isSinglePoint && (nodeIds.size() != 1)) {
          throw new IOException("singlePoint tree, but missing single point...");
        }
        int counter = 0;
        for (MtasTreeNodeId nodeId : nodeIds) {
          counter++;
          objectRefCorrected = (nodeId.ref - refApproxOffset);
          assert objectRefCorrected >= objectRefCorrectedPrevious : "objectRefCorrected<objectRefCorrectedPrevious : "
              + objectRefCorrected + " and " + objectRefCorrectedPrevious;
          out.writeVLong((objectRefCorrected - objectRefCorrectedPrevious));
          objectRefCorrectedPrevious = objectRefCorrected;
          if (storeAdditionalInformation) {
            assert nodeId.additionalId >= 0 : "nodeId.additionalId < 0 for item "
                + counter + " : " + nodeId.additionalId;
            out.writeVInt(nodeId.additionalId);
            assert nodeId.additionalRef >= 0 : "nodeId.additionalRef < 0 for item "
                + counter + " : " + nodeId.additionalRef;
            out.writeVLong(nodeId.additionalRef);
          }
        }
        return fpIndexObjectPosition;
      } else {
        return null;
      }
    }