docs: private static SparseTensor resizeIntoTable(int[] dimensions, int[] dimensionSizes,
        long[] keyNums, double[] values, int size) {
      if (values.length == size) {
        return new SparseTensor(dimensions, dimensionSizes, keyNums, values);
      } else {
        // Resize the result array to fit the actual number of result
        // keyNums.
        long[] shrunkResultKeyInts = ArrayUtils.copyOf(keyNums, size);
        double[] shrunkResultValues = ArrayUtils.copyOf(values, size);
        return new SparseTensor(dimensions, dimensionSizes, shrunkResultKeyInts, shrunkResultValues);
      }
    }