code: def dict_to_csv(output_results_dict):
      with open("../results/benchmarks.json") as f:
          benchmark_conf = json.load(f)
      unit_dict = {}
      for k, v in benchmark_conf.items():
          if k != "version":
              unit_dict[k] = v["unit"]
      result_list = []
      for machine, per_machine_result in output_results_dict.items():
          for commit, test_cases in per_machine_result.items():
              branch_name = get_branch_name_from_hash(commit)
              result_column_name = "number_{}".format(branch_name)
              # per_commit_result_list = []
              for test_case_name, results in test_cases.items():
                  for result in results:
                      result_list.append(
                          {
                              "test_name": test_case_name,
                              "params": result["params"],
                              "unit": unit_dict[test_case_name],
                              "number": result["result"],
                              "commit": branch_name,
                              "machine": machine,
                          }
                      )
      df = pd.DataFrame(result_list)
      return df
  
file_path: dgl/benchmarks/scripts/generate_excel.py
imports: import json
  from itertools import product
  from pathlib import Path
  import pandas
label_desc: Use image node_id 3 for calling a global function with example usage: dict_to_csv(output_results_dict) and returns: df