class CmTemplateProcessor implements BlueprintTextProcessor {

    @Override
    public Map<String, InstanceCount> getCardinalityByHostGroup() {
        Map<String, InstanceCount> result = new TreeMap<>();
        for (ApiClusterTemplateHostTemplate group : Optional.ofNullable(cmTemplate.getHostTemplates()).orElse(List.of())) {
            InstanceCount recommendedCount = recommendInstanceCount(group.getRefName(), group.getCardinality())
                    .orElse(InstanceCount.fallbackInstanceCountRecommendation(group.getRefName()));
            result.put(group.getRefName(), recommendedCount);
        }
        return result;
    }

    public  CmTemplateProcessor(@Nonnull String cmTemplateText);

}