code: def save_scores(score_dict: Dict, out_path: str) -> None:
      # create destination directory if not exists
      pathlib.Path(os.path.dirname(out_path)).mkdir(
          parents=True, exist_ok=True
      )
      score_list = list(score_dict.keys())
      with open(out_path, "w") as output_file:
          n_scores = len(score_list)
          out_line = "{:<8} " + " ".join(
              ["{:<15}" for i in range(n_scores)]
          )
          print(out_line.format("ID", *score_list), file=output_file)
          n_samples = len(score_dict[score_list[0]])
          for i in range(n_samples):
              scores = []
              for score in score_list:
                  scores.append(score_dict[score][i])
              print(out_line.format(i, *scores), file=output_file)
      print(f"Scores written to {out_path}")
  
file_path: ParlAI/projects/roscoe/utils.py
imports: import numpy
  import os
  import pathlib
  from nltk.tokenize import sent_tokenize
  from typing import Callable, Dict, Iterable, List, Tuple
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: save_scores(score_dict, out_path) without return types