code: def collect_results(
      files: "List[str]", metric: "str"
  ) -> "pd.DataFrame":
      results = defaultdict(lambda: [None] * len(files))
      for k, file in enumerate(files):
          for name, time in load_file(file).items():
              results[name][k] = (
                  time[metric] if not time["failed"] else None
              )
  
      return pd.DataFrame(data=results, index=files)
  
file_path: hail/benchmark/python/benchmark_hail/visualize.py
imports: import matplotlib.pyplot
  import pandas
  from collections import defaultdict
  from .compare import load_file
  from typing import List, Optional
label_desc: Use image node_id 1 for calling a global function with example usage: collect_results(files, metric) and returns: pd