protected CompositeNode transformChildren(CompositeNode node, CONTEXT context) {
        List<ExpressionNode> children = node.children();
        List<ExpressionNode> transformedChildren = null;

        for (int i = 0; i < children.size(); ++i) {
            ExpressionNode child = children.get(i);
            ExpressionNode transformedChild = transform(child, context);
            if (child != transformedChild) {
                if (transformedChildren == null) {
                    transformedChildren = new ArrayList<>(children);
                }
                transformedChildren.set(i, transformedChild);
            }
        }

        return transformedChildren == null ? node : node.setChildren(transformedChildren);
    }
Utility method which calls transform on each child of the given node and return the resulting transformed
composite
searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/transform/ExpressionTransformer.java