public Optional<Long> sizeOfDimension(String dimension) {
        Optional<Dimension> d = dimension(dimension);
        if (d.isEmpty()) return Optional.empty();
        return d.get().size();
    }
Returns the 0-base index of this dimension, or empty if it is not present
vespajlib/src/main/java/com/yahoo/tensor/TensorType.java