presto-resource-group-managers/src/main/java/io/prestosql/plugin/resourcegroups/ResourceGroupNameTemplate.java/ResourceGroupNameTemplate/expandTemplate
class ResourceGroupNameTemplate:    public String expandTemplate(VariableMap variables)
    {
        StringBuilder builder = new StringBuilder();
        for (NameFragment fragment : fragments) {
            if (fragment.isVariable()) {
                String value = variables.getValue(fragment.getVariable());
                checkArgument(value != null, "unresolved variable '%s' in resource group '%s', available: %s", fragment.getVariable(), this, variables);
                builder.append(value);
            }
            else {
                builder.append(fragment.getLiteral());
            }
        }

        return builder.toString();
    }