def METHOD_NAME(result_dir):
    result_dir = Path(result_dir)
    assert result_dir.is_dir(), f"Expected directory {str(result_dir)} doesn't exist."
    result_metrics = {}
    runs = get_runs(result_dir)
    cpu_train = list(filter(lambda x: x["test"] == "train", runs))
    if len(cpu_train):
        add_test_results(cpu_train, result_metrics)
    cpu_eval = list(filter(lambda x: x["test"] == "eval", runs))
    if len(cpu_eval):
        add_test_results(cpu_eval, result_metrics)
    return result_metrics