docs: public static final long[] computeIndexOffsets(int[] sizes) {
      long[] indexOffsets = new long[sizes.length];
      for (int i = sizes.length - 1; i >= 0; i--) {
        if (i == sizes.length - 1) {
          indexOffsets[i] = 1;
        } else {
          indexOffsets[i] = indexOffsets[i + 1] * ((long) sizes[i + 1]);
        }
      }
      return indexOffsets;
    }