code: def write_candidate_generation_results_for_a_run_to_file(
      run, results_dump_file_path
  ):
      txt_file_path = "{}.txt".format(results_dump_file_path)
  
      with open(txt_file_path, "a+") as file:
          id_ = "Q: `{}` === K: `{}` === ID: `{}`".format(
              run[0]["query"], run[0]["keys"], run[0]["dump_file_id"]
          )
          res = " --- ".join(
              [
                  "{} - {:.2f}".format(key, run[1][key])
                  for key in sorted(run[1].keys())
              ]
          )
          file.write("{} === {}\n".format(res, id_))
  
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 6 for calling a global function with example usage: write_candidate_generation_results_for_a_run_to_file(run, results_dump_file_path) without return types