public Optional<Tensor> getAsTensor(String name) {
        List<Object> values = properties.get(name);
        if (values == null || values.isEmpty()) return Optional.empty();
        if (values.size() != 1) {
            throw new IllegalArgumentException("unexpected multiple [" + values.size() + "] values for property '" + name + "'");
        }
        Object feature = values.get(0);
        if (feature == null) return Optional.empty();
        if (feature instanceof Tensor t) return Optional.of(t);
        if (feature instanceof Double d) return Optional.of(Tensor.from(d));
        throw new IllegalArgumentException("Expected '" + name + "' to be a tensor or double, but it is '" + feature +
                "', this usually means that '" + name + "' is not defined in the schema. " +
                "See https://docs.vespa.ai/en/tensor-user-guide.html#querying-with-tensors");
    }
Returns a tensor (as moved from RankFeatures by prepare step) if present

@throws IllegalArgumentException if the value is there but wrong type
container-search/src/main/java/com/yahoo/search/query/ranking/RankProperties.java