code: def _export_scalars(args):
      with _open_file(args.export_scalars) as f:
          out = csv.writer(f)
          out.writerow(["run", "path", "tag", "value", "step"])
          for run in _list_runs_cb(args)():
              for path, _digest, reader in tfevent.scalar_readers(
                  run.dir
              ):
                  subpath = os.path.relpath(path, run.dir)
                  for tag, value, step in reader:
                      out.writerow([run.id, subpath, tag, value, step])
  
imports: import csv
  import logging
  import os
  import re
  import sys
  import time
  from guild import batch_util
  from guild import cli
  from guild import op_util
  from guild import run_util
  from guild import tfevent
  from guild import util
  from .None import runs_impl
label_desc: Use image node_id 2 for calling a global function with example usage: _export_scalars(args) without return types