code: def collect_coverage_info(
      coverage_dir: str, dataset: str
  ) -> Dict[str, Dict[str, Any]]:
      os.makedirs(coverage_dir, exist_ok=True)
      problems = get_problems(dataset)
      task_ids = get_task_ids(dataset)
      coverage_info = {task_id: {} for task_id in task_ids}
      for task_id in track(
          task_ids, description="Testing gt coverage..."
      ):
          coverage_cache_path = os.path.join(
              coverage_dir, f"{to_path(task_id)}.pkl"
          )
          if os.path.isfile(coverage_cache_path):
              with open(coverage_cache_path, "rb") as f:
                  coverage_info[task_id] = pickle.load(f)
              continue
          groundtruth_code = (
              problems[task_id]["prompt"]
              + problems[task_id]["canonical_solution"]
          )
          plus_tests = problems[task_id]["plus_input"]
          entry_point = problems[task_id]["entry_point"]
          for i, plus_test in enumerate(plus_tests):
              per, branch, branch_covered = test_code_coverage(
                  to_path(task_id),
                  groundtruth_code,
                  [plus_test],
                  entry_point,
              )
              test_id = f"plus_{i}"
              coverage_info[task_id].setdefault(test_id, []).extend(
                  [(br, "gt") for br in branch_covered]
              )
          with open(coverage_cache_path, "wb") as f:
              pickle.dump(coverage_info[task_id], f)
  
      return coverage_info
  
file_path: evalplus/tools/tsr/coverage_init.py
imports: import os
  import pickle
  import sys
  from importlib import import_module
  from io import StringIO
  from typing import Any, Dict, List
  import coverage
  from rich.progress import track
  from evalplus.eval.utils import swallow_io
  from tools.tsr.utils import get_problems, get_task_ids, to_path
label_desc: Use image node_id 3 for calling a global function with example usage: collect_coverage_info(coverage_dir, dataset) and returns: coverage_info