code: def write_header(outdir, agent, env):
      # Columns that describe information about an experiment.
      basic_columns = (
          "steps",  # number of time steps taken (= number of actions taken)
          "episodes",  # number of episodes finished
          "elapsed",  # time elapsed so far (seconds)
          "mean",  # mean of returns of evaluation runs
          "median",  # median of returns of evaluation runs
          "stdev",  # stdev of returns of evaluation runs
          "max",  # maximum value of returns of evaluation runs
          "min",  # minimum value of returns of evaluation runs
      )
      with open(os.path.join(outdir, "scores.txt"), "w") as f:
          custom_columns = tuple(t[0] for t in agent.get_statistics())
          env_get_stats = getattr(env, "get_statistics", lambda: [])
          assert callable(env_get_stats)
          custom_env_columns = tuple(t[0] for t in env_get_stats())
          column_names = (
              basic_columns + custom_columns + custom_env_columns
          )
          print("\t".join(column_names), file=f)
  
imports: import logging
  import multiprocessing
  import os
  import statistics
  import time
  import numpy
  import pfrl
label_desc: Use image node_id 11 for calling a global function with example usage: write_header(outdir, agent, env) without return types