presto-resource-group-managers/src/main/java/io/prestosql/plugin/resourcegroups/ResourceGroupIdTemplate.java/ResourceGroupIdTemplate/expandTemplate
class ResourceGroupIdTemplate:    public ResourceGroupId expandTemplate(VariableMap context)
    {
        ResourceGroupId id = null;
        for (ResourceGroupNameTemplate segment : segments) {
            String expanded = segment.expandTemplate(context);
            if (id == null) {
                id = new ResourceGroupId(expanded);
            }
            else {
                id = new ResourceGroupId(id, expanded);
            }
        }
        return id;
    }