static long toValueIndex(TensorAddress address, DimensionSizes sizes, TensorType type) {
        long valueIndex = 0;
        for (int i = 0, size = address.size(); i < size; i++) {
            long label = address.numericLabel(i);
            if (label >= sizes.size(i))
                throw new IllegalArgumentException(address + " is not within the bounds of " + type);
            valueIndex += sizes.productOfDimensionsAfter(i) * label;
        }
        return valueIndex;
    }
Returns the value at the given <i>standard value order</i> index as a float.

@param valueIndex the direct index into the underlying data.
@throws IllegalArgumentException if index is out of bounds
vespajlib/src/main/java/com/yahoo/tensor/IndexedTensor.java