code: @Override
    public SparseTensor relabelDimensions(Map<Integer, Integer> relabeling) {
      int[] newDimensions = new int[numDimensions()];
      int[] dimensionNums = getDimensionNumbers();
      for (int i = 0; i < dimensionNums.length; i++) {
        Preconditions.checkArgument(relabeling.containsKey(dimensionNums[i]),
            "Dimension %s not in relabeling %s", dimensionNums[i], relabeling);
        newDimensions[i] = relabeling.get(dimensionNums[i]);
      }
      return relabelDimensions(newDimensions);
    }
docs: Relabels the dimensions of {@code this}. Each dimension is
  relabeled to its value in {@code relabeling}. {@code relabeling}
  must contain a unique value for each of
  {@code this.getDimensionNumbers()}.
  
  @param relabeling
  @see #relabelDimensions(int[])
  @return