public static Long tensorSize(TensorType type) {
        Long size = 1L;
        for (TensorType.Dimension dimension : type.dimensions()) {
            size *= dimensionSize(dimension);
        }
        return size;
    }
When dimension ordering between Vespa and imported differs, i.e.
after dimension renaming, use the dimension map to read in values
so that they are correctly laid out in memory for Vespa.
Used when importing tensors.
model-integration/src/main/java/ai/vespa/rankingexpression/importer/OrderedTensorType.java