@Override
    public ExpressionNode transform(ExpressionNode node, TransformContext context) {
        if (node instanceof TensorFunctionNode tfn) {
            node = tfn.withTransformedExpressions(expr -> transform(expr, context));
        }
        if (node instanceof ReferenceNode)
            return transformFeature((ReferenceNode) node, context);
        else if (node instanceof CompositeNode)
            return transformChildren((CompositeNode)node, context);
        else
            return node;
    }
Replaces constant reference pseudofeatures which are scalars by their constant value

@author bratseth
searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/transform/ConstantDereferencer.java