private void addDimensionsOf(TensorType type, boolean allowDifferentSizes) {
            for (Dimension dimension : type.dimensions) {
                set(dimension.combineWith(Optional.ofNullable(dimensions.get(dimension.name())), allowDifferentSizes));
            }
        }
Creates a builder from the given value type and dimensions
vespajlib/src/main/java/com/yahoo/tensor/TensorType.java