private Item instantiateLeafItem(String field, String key, Inspector value) {
        List<Inspector> possibleLeafFunction = valueListFromInspector(value);
        String possibleLeafFunctionName = (possibleLeafFunction.size() > 1) ? getInspectorKey(possibleLeafFunction.get(1)) : "";
        if (FUNCTION_CALLS.contains(key)) {
            return instantiateCompositeLeaf(field, key, value);
        } else if (!possibleLeafFunctionName.isEmpty()){
           return instantiateCompositeLeaf(field, possibleLeafFunctionName, valueListFromInspector(value).get(1).field(possibleLeafFunctionName));
        } else {
            return instantiateWordItem(field, key, value);
        }
    }
Translates a list of grouping requests on JSON form to a list in the grouping language form
container-search/src/main/java/com/yahoo/search/query/SelectParser.java