code: def gather_metrics(self, runs):
          
          for run_dirs in runs.values():
              with open(JSON_METRICS_FILE, 'w') as ostr:
                  ostr.write('[\n')
                  for i in range(len(run_dirs)):
                      with open(osp.join(run_dirs[i], YAML_REPORT_FILE)) as istr:
                          data = yaml.safe_load(istr)
                          data.pop('category', None)
                          data.pop('command', None)
                          data['id'] = run_dirs[i]
                          json.dump(data, ostr, indent=2)
                      if i != len(run_dirs) - 1:
                          ostr.write(',')
                      ostr.write('\n')
                  ostr.write(']\n')
docs: Write a JSON file with the result of every runs