public Builder dimension(String name, Dimension.Type type) {
            switch (type) {
                case mapped -> mapped(name);
                case indexedUnbound -> indexed(name);
                default -> throw new IllegalArgumentException("This can not create a dimension of type " + type);
            }
            return this;
        }
Returns the given dimension, or empty if none is present
vespajlib/src/main/java/com/yahoo/tensor/TensorType.java