docs: private static void finalizeFreshIndexStats(Map<String, OnDemandIndexStats> freshStats) {
          if (freshStats == null) {
              return;
          }
  
          for (OnDemandIndexStats freshIndexStats : freshStats.values()) {
              long totalHitCount = freshIndexStats.getTotalHitCount();
              if (totalHitCount != 0) {
                  double averageHitSelectivity = 1.0 - freshIndexStats.getAverageHitSelectivity() / totalHitCount;
                  averageHitSelectivity = Math.max(0.0, averageHitSelectivity);
                  freshIndexStats.setAverageHitSelectivity(averageHitSelectivity);
                  freshIndexStats.setAverageHitLatency(freshIndexStats.getAverageHitLatency() / totalHitCount);
              }
          }
      }