code: def write_candidate_generation_results_to_file(
      runs, results_dump_file_path, execution_time=None
  ):
      runs.sort(key=lambda run: -run[1]["overall"])
  
      for run in runs:
          write_candidate_generation_results_for_a_run_to_file(
              run, results_dump_file_path
          )
  
      if execution_time is not None:
          write_candidate_generation_execution_time_to_file(
              results_dump_file_path, execution_time
          )
  
file_path: BLINK/blink/candidate_retrieval/utils.py
imports: import sys
  import pickle
  import subprocess
  import blink.candidate_retrieval.dataset
  import re
  import os
label_desc: Use image node_id 8 for calling a global function with example usage: write_candidate_generation_results_to_file(runs, results_dump_file_path, execution_time) without return types