docs: protected IndexTreePath<E> choosePath(IndexTreePath<E> subtree, SpatialComparable mbr, int depth, int cur) {
      if(getLogger().isDebuggingFiner()) {
        getLogger().debugFiner("node " + subtree + ", depth " + depth);
      }
  
      N node = getNode(subtree.getEntry());
      if(node == null) {
        throw new RuntimeException("Page file did not return node for node id: " + getPageID(subtree.getEntry()));
      }
      if(node.isLeaf()) {
        return subtree;
      }
      // first test on containment
      IndexTreePath<E> newSubtree = containedTest(subtree, node, mbr);
      if(newSubtree != null) {
        return (++cur == depth) ? newSubtree : choosePath(newSubtree, mbr, depth, cur);
      }
  
      N childNode = getNode(node.getEntry(0));
      int num = settings.insertionStrategy.choose(node, NodeArrayAdapter.STATIC, mbr, height, cur);
      newSubtree = new IndexTreePath<>(subtree, node.getEntry(num), num);
      ++cur;
      if(cur == depth) {
        return newSubtree;
      }
      // children are leafs
      if(childNode.isLeaf()) {
        assert cur == newSubtree.getPathCount(); // Check for programming errors
        throw new IllegalArgumentException("childNode is leaf, but currentDepth != depth: " + cur + " != " + depth);
      }
      // children are directory nodes
      return choosePath(newSubtree, mbr, depth, cur);
    }