code: def main():
      results_path = Path("../results")
      results_path.is_dir()
      machines = [f for f in results_path.glob("*") if f.is_dir()]
      output_results_dict = {}
      for machine in machines:
          per_machine_result = {}
          commit_results_json_paths = [
              f for f in machine.glob("*") if f.name != "machine.json"
          ]
          for commit in commit_results_json_paths:
              with commit.open() as f:
                  commit_result = json.load(f)
              commit_hash = commit_result["commit_hash"]
              per_commit_result = {}
              for test_name, result in commit_result["results"].items():
                  per_commit_result[test_name] = []
                  if result["result"] is None:
                      for test_args in product(*result["params"]):
                          per_commit_result[test_name].append(
                              {
                                  "params": ", ".join(test_args),
                                  "result": None,
                              }
                          )
                  else:
                      for test_args, performance_number in zip(
                          product(*result["params"]), result["result"]
                      ):
                          per_commit_result[test_name].append(
                              {
                                  "params": ", ".join(test_args),
                                  "result": performance_number,
                              }
                          )
              per_machine_result[commit_hash] = per_commit_result
          output_results_dict[machine.name] = per_machine_result
      return output_results_dict
  
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 2 for calling a global function with example usage: main() and returns: output_results_dict