def _get_subgroup_index(group_above, subgroup_name):
        subgroups_with_index = {subgroup['label']: index for index, subgroup in enumerate(group_above)}
        index = subgroups_with_index[subgroup_name]
        return index