private static RankingExpression replaceConstantsByFunctions(RankingExpression expression,
                                                                 Set<String> constantsReplacedByFunctions) {
        if (constantsReplacedByFunctions.isEmpty()) return expression;
        return new RankingExpression(expression.getName(),
                                     replaceConstantsByFunctions(expression.getRoot(),
                                                                 constantsReplacedByFunctions));
    }
If a constant c is overridden by a function, we need to replace instances of "constant(c)" by "c" in expressions.
This method does that for the given expression and returns the result.
config-model/src/main/java/com/yahoo/vespa/model/ml/ConvertedModel.java