docs: static <T> void maybeGrowLevels(final ItemsSketch<T> sketch, final long newN) {
      // important: newN might not equal n_
      final int k = sketch.getK();
      final int numLevelsNeeded = Util.computeNumLevelsNeeded(k, newN);
      if (numLevelsNeeded == 0) {
        // don't need any levels yet, and might have small base buffer; this can happen during a merge
        return;
      }
      // from here on we need a full-size base buffer and at least one level
      assert newN >= 2L * k;
      assert numLevelsNeeded > 0;
      final int spaceNeeded = (2 + numLevelsNeeded) * k;
      if (spaceNeeded <= sketch.getCombinedBufferAllocatedCount()) {
        return;
      }
      // copies base buffer plus old levels
      sketch.combinedBuffer_ = Arrays.copyOf(sketch.getCombinedBuffer(), spaceNeeded);
      sketch.combinedBufferItemCapacity_ = spaceNeeded;
    }