docs: private Node chooseLeaf(Node node, Point point)
    {
      node.addToBitmapIndex(point);
  
      if (node.isLeaf()) {
        return node;
      }
  
      double minCost = Double.POSITIVE_INFINITY;
      Node optimal = node.getChildren().get(0);
      for (Node child : node.getChildren()) {
        double cost = RTreeUtils.getExpansionCost(child, point);
        if (cost < minCost) {
          minCost = cost;
          optimal = child;
        } else if (cost == minCost) {
          // Resolve ties by choosing the entry with the rectangle of smallest area
          if (child.getArea() < optimal.getArea()) {
            optimal = child;
          }
        }
      }
  
      return chooseLeaf(optimal, point);
    }