docs: public static CachedSparseTensor cacheAllPermutations(SparseTensor tensor) {
      Map<List<Integer>, SparseTensor> tensorCache = Maps.newHashMap();
      Iterator<int[]> permutationIterator = new PermutationIterator(tensor.getDimensionNumbers().length);
      while (permutationIterator.hasNext()) {
        List<Integer> currentPermutation = Ints.asList(permutationIterator.next());
        tensorCache.put(currentPermutation, tensor.relabelDimensions(
            Ints.toArray(currentPermutation)));
      }
      return new CachedSparseTensor(tensor.getDimensionNumbers(), tensor.getDimensionSizes(),
          tensor.keyNums, tensor.values, tensorCache);
    }