private static TensorType.Dimension tryParseIndexedDimension(String element) {
        Matcher matcher = indexedPattern.matcher(element);
        if (matcher.matches()) {
            String dimensionName = matcher.group(1);
            String dimensionSize = matcher.group(2);
            if (dimensionSize.isEmpty())
                return TensorType.Dimension.indexed(dimensionName);
            else
                return TensorType.Dimension.indexed(dimensionName, Integer.valueOf(dimensionSize));
        }
        return null;
    }
@param dimensionOrder if not null, this will be populated with the dimension names in the order they are written
vespajlib/src/main/java/com/yahoo/tensor/TensorTypeParser.java