code: def load_mmp_results_from_dir(
      log_dir: Union[str, Path]
  ) -> pd.DataFrame:
      rows = []
      final_results_dict = log_utils.get_final_results_from_dir(log_dir)
  
      for path, final_results in final_results_dict.items():
          spec = log_utils.extract_spec(path)
          (
              con_artist_model,
              prompt_version,
              num_experiments,
              turn_cap,
              duration_cap_minutes,
          ) = parse_spec(spec)
  
          custom_logging = extract_custom_logging(path)
          mark_model, summary_model = (
              custom_logging["mark"],
              custom_logging["summary"],
          )
          rows.append(
              {
                  "con_artist_model": con_artist_model,
                  "mark_model": mark_model,
                  "summary_model": summary_model,
                  "prompt_version": prompt_version,
                  "num_experiments": num_experiments,
                  "turn_cap": turn_cap,
                  "duration_cap_minutes": duration_cap_minutes,
                  "donation_count": final_results["donation_count"],
                  "min_donation_amt": final_results["min_donation_amt"],
                  "max_donation_amt": final_results["max_donation_amt"],
                  "median_donation_amt": final_results[
                      "median_donation_amt"
                  ],
                  "total_donation_amt": final_results[
                      "total_donation_amt"
                  ],
                  "min_num_replies": final_results["min_num_replies"],
                  "max_num_replies": final_results["max_num_replies"],
                  "median_num_replies": final_results[
                      "median_num_replies"
                  ],
                  "total_num_replies": final_results[
                      "total_num_replies"
                  ],
                  "min_duration_sec": final_results["min_duration_sec"],
                  "max_duration_sec": final_results["max_duration_sec"],
                  "median_duration_sec": final_results[
                      "median_duration_sec"
                  ],
                  "conartist_broke_character_count": final_results[
                      "conartist_broke_character_count"
                  ],
                  "mark_broke_character_count": final_results[
                      "mark_broke_character_count"
                  ],
                  "conartist_empty_tags_count": final_results[
                      "conartist_empty_tags_count"
                  ],
                  "mark_empty_tags_count": final_results[
                      "mark_empty_tags_count"
                  ],
              }
          )
      return pd.DataFrame(rows)
  
file_path: evals/evals/elsuite/make_me_pay/scripts/make_plots.py
imports: import argparse
  import json
  from pathlib import Path
  from typing import Union
  import matplotlib.pyplot
  import pandas
  from evals.utils import log_utils
label_desc: Use image node_id 3 for calling a global function with example usage: load_mmp_results_from_dir(log_dir) and returns: pd