def get_annotation_classes_id_to_name(annotation_classes):
    annotation_classes_dict = {}
    for annotation_class in annotation_classes:
        class_id = annotation_class['id']
        class_name = annotation_class['name']
        class_info = {'name': class_name}
        class_info['attribute_groups'] = {}
        if ('attribute_groups' in annotation_class):
            for attribute_group in annotation_class['attribute_groups']:
                attribute_group_info = {}
                for attribute in attribute_group['attributes']:
                    attribute_group_info[attribute['id']] = attribute['name']
                class_info['attribute_groups'][attribute_group['id']] = {'name': attribute_group['name'], 'attributes': attribute_group_info}
        annotation_classes_dict[class_id] = class_info
    return annotation_classes_dict
def get_annotation_classes_id_to_name(annotation_classes):
    annotation_classes_dict = {}
    for annotation_class in annotation_classes:
        class_id = annotation_class['id']
        class_name = annotation_class['name']
        class_info = {'name': class_name}
        class_info['attribute_groups'] = {}
        if ('attribute_groups' in annotation_class):
            for attribute_group in annotation_class['attribute_groups']:
                attribute_group_info = {}
                for attribute in attribute_group['attributes']:
                    attribute_group_info[attribute['id']] = attribute['name']
                class_info['attribute_groups'][attribute_group['id']] = {'name': attribute_group['name'], 'attributes': attribute_group_info}
        annotation_classes_dict[class_id] = class_info
    return annotation_classes_dict