def METHOD_NAME(results, tests, suite_name):
    suite_name = suite_name.partition("_")[2]
    suite_results = results[suite_name] = dict()
    test_sets = dict()
    for test in reversed(tests):
        test_set_name = test['metadata'].get('set')
        if test_set_name:
            test_cases = suite_results.setdefault(test_set_name, dict())
        else:
            test_cases = suite_results
        test_cases[test['name']] = test['result']