private ExpressionNode optimize(ExpressionNode node, ContextIndex context) {
        node = optimizeReduceJoin(node);
        if (node instanceof CompositeNode) {
            return optimizeChildren((CompositeNode)node, context);
        }
        return node;
    }
Recognizes and optimizes tensor expressions.

@author lesters
searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/evaluation/tensoroptimization/TensorOptimizer.java