code: def stats_printer(stats_queue):
      """A thread that consumes stats_queue and prints them every 10 seconds."""
      proc_stats = [ProcessStats(i) for i in range(FLAGS.parallel)]
      print_time = start_time = time.time()
      width = 107
  
      running = True
      while running:
          print_time += 10
  
          while time.time() < print_time:
              try:
                  s = stats_queue.get(True, print_time - time.time())
                  if s is None:  # Signal to print and exit NOW!
                      running = False
                      break
                  proc_stats[s.proc_id] = s
              except queue.Empty:
                  pass
  
          replay_stats = ReplayStats()
          for s in proc_stats:
              replay_stats.merge(s.replay_stats)
  
          print(
              (" Summary %0d secs " % (print_time - start_time)).center(
                  width, "="
              )
          )
          print(replay_stats)
          print(" Process stats ".center(width, "-"))
          print("\n".join(str(s) for s in proc_stats))
          print("=" * width)
  
imports: import collections
  import multiprocessing
  import os
  import queue
  import signal
  import sys
  import threading
  import time
  from absl import app
  from absl import flags
  from pysc2 import run_configs
  from pysc2.lib import features
  from pysc2.lib import point
  from pysc2.lib import protocol
  from pysc2.lib import remote_controller
  from pysc2.lib import replay
  from pysc2.lib import static_data
  from pysc2.lib import gfile
  from s2clientprotocol import common_pb2
  from s2clientprotocol import sc2api_pb2
label_desc: Use image node_id 3 for calling a global function with example usage: stats_printer(stats_queue) without return types