code: def print_benchmark_records(records, file_):
      """Write benchmark records to file-like the object"""
      print(BenchmarkRecord.get_header(), file=file_)
      for r in records:
          print(r.to_tsv(), file=file_)
  
imports: import contextlib
  import datetime
  from itertools import chain
  import os
  import time
  import threading
  from snakemake.logging import logger
label_desc: Use image node_id 2 for calling a global function with example usage: print_benchmark_records(records, file_) without return types