code: def benchmark(params, output=output_file):
      ds = generate_param_dicts(params)
      print(f"Running {len(ds)} benchmarks...")
      results = []
      warmup_run()
      for d in tqdm(ds):
          result = benchmark_single(**d)
          results.append(result)
          df = pd.DataFrame.from_records(results)
          df.to_csv(output)
          logger.info("\n\n" + pformat(result) + "\n")
          with open(output_file.replace(".csv", ".md"), "w") as f:
              f.write(str(df.to_markdown()))
  
file_path: FARM/test/benchmarks/question_answering_components.py
imports: from farm.infer import Inferencer
  from pprint import pformat
  import pandas
  from tqdm import tqdm
  import logging
  import json
  from datetime import date
label_desc: Use image node_id 1 for calling a global function with example usage: benchmark(params, output) without return types