code: def record_tb_stats_loop(outdir, queue, stop_event):
      tb_writer = create_tb_writer(outdir)
  
      while not (stop_event.wait(1e-6) and queue.empty()):
          if not queue.empty():
              agent_stats, eval_stats, env_stats, t = queue.get()
              record_tb_stats(
                  tb_writer, agent_stats, eval_stats, env_stats, t
              )
  
imports: import logging
  import multiprocessing
  import os
  import statistics
  import time
  import numpy
  import pfrl
label_desc: Use image node_id 9 for calling a global function with example usage: record_tb_stats_loop(outdir, queue, stop_event) without return types