code: def main(unused_argv):
      logging.set_verbosity(logging.INFO)
      np.random.seed(0)
  
      thread_counts = [1, 2, 4, 6, 8, 10, 12, 14, 16, 32]
  
      logger.info("Warming up...")
      warmup_image = _image_of_size(256)
      for thread_count in thread_counts:
          bench(warmup_image, thread_count)
  
      logger.info("Running...")
      results = {}
      image = _image_of_size(4096)
      headers = (
          "THREADS",
          "TOTAL_TIME",
          "UNIT_TIME",
          "SPEEDUP",
          "PARALLELISM",
      )
      logger.info(_format_line(headers, headers))
      for thread_count in thread_counts:
          time.sleep(1.0)
          total_time = min(
              bench(image, thread_count) for _ in range(3)
          )  # best-of-three timing
          unit_time = total_time / thread_count
          if total_time < 2.0:
              logger.warning(
                  "This benchmark is running too quickly! This "
                  "may cause misleading timing data. Consider "
                  "increasing the image size until it takes at "
                  "least 2.0s to encode one image."
              )
          results[thread_count] = unit_time
          speedup = results[1] / results[thread_count]
          parallelism = speedup / thread_count
          fields = (
              thread_count,
              total_time,
              unit_time,
              speedup,
              parallelism,
          )
          logger.info(_format_line(headers, fields))
  
file_path: tensorboard/tensorboard/encode_png_benchmark.py
imports: import datetime
  import threading
  import time
  from absl import app
  from absl import logging
  import numpy
  from tensorboard.util import encoder
  from tensorboard.util import tb_logging
label_desc: Use image node_id 4 for calling a global function with example usage: main(unused_argv) without return types