def reverse_class_dependencies(dependencies):
    """ Reverses class dependency dictionary
    Consumes dictionary in format
    {
        'test_class_name_1': {
            'Id': '01pU00000026druIAA',
            'References': ['class_name_1', 'class_name_2']
        }
    }
    produces dictionary in format
    {
        'class_name_1': ['test_class_name_1'],
        'class_name_2': ['test_class_name_1']
    } """
    reverse_deps = dict()
    for class_name, data in dependencies.items():
        for dep_class_name in data['References']:
            if dep_class_name in reverse_deps:
                if class_name in reverse_deps[dep_class_name]:
                    continue
                cur_class_deps = reverse_deps[dep_class_name]
            else:
                cur_class_deps = list()
            cur_class_deps.append(class_name)
            cur_class_deps.sort()
            reverse_deps[dep_class_name] = cur_class_deps
    return reverse_deps