@Override
    public TensorType type(TypeContext<NAMETYPE> context) {
        List<String> resolvedFromDimensions = fromDimensions.stream().map(d -> context.resolveBinding(d)).toList();
        List<String> resolvedToDimensions = toDimensions.stream().map(d -> context.resolveBinding(d)).toList();
        return TypeResolver.rename(argument.type(context), resolvedFromDimensions, resolvedToDimensions);
    }
The <i>rename</i> tensor function returns a tensor where some dimensions are assigned new names.

@author bratseth
vespajlib/src/main/java/com/yahoo/tensor/functions/Rename.java