code: def extract_individual_results(path: Path) -> list[dict]:
      """
      Given a path to a log file, grab all the individual sample results.
      """
      all_data = []
      with path.open() as f:
          for line in f.readlines():
              line = line.strip()
              try:
                  loaded_line = json.loads(line)
                  if "type" in loaded_line:
                      if loaded_line["type"] == "metrics":
                          all_data.append(loaded_line["data"])
              except json.decoder.JSONDecodeError:
                  print(f"Skipping line: {line}")
                  continue
      return all_data
  
imports: import json
  from pathlib import Path
  from typing import Union
label_desc: Use image node_id 3 for calling a global function with example usage: extract_individual_results(path) and returns: all_data