private static ScalarFunction<Reference> transform(ScalarFunction<Reference> input,
                                                       Function<ExpressionNode, ExpressionNode> transformer) {
        if (input instanceof ExpressionScalarFunction wrapper) {
            ExpressionNode transformed = transformer.apply(wrapper.expression);
            return new ExpressionScalarFunction(transformed);
        }
        return input;
    }
Returns the tensor function wrapped by this
searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/TensorFunctionNode.java