private static Map<String, ExpressionFunction> toMap(Collection<ExpressionFunction> list) {
        Map<String, ExpressionFunction> mapBuilder = new HashMap<>();
        for (ExpressionFunction function : list)
            mapBuilder.put(function.getName(), function);
        return Map.copyOf(mapBuilder);
    }
Create a context for a single serialization task
searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/FunctionReferenceContext.java