code: def create_writer_for_run(out_dir, run, suffix):
      # Special case: the "." run corresponds to the root directory.
      if run == ".":
          dir = out_dir
      else:
          # Convert path separators in run names to be platform-specific.
          translated_run = run.replace("/", os.path.sep)
          dir = os.path.join(out_dir, translated_run)
      return EventFileWriter(
          dir,
          max_queue_size=1000,
          filename_suffix=".tbdev-converter-" + suffix,
      )
  
file_path: tensorboard/tensorboard/tools/convert_tbdev_export.py
imports: import argparse
  import base64
  import collections
  import json
  import logging
  import os
  import re
  import tempfile
  from tensorboard.compat.proto.event_pb2 import Event
  from tensorboard.compat.proto.summary_pb2 import Summary
  from tensorboard.summary.writer.event_file_writer import EventFileWriter
  from tensorboard.util import tensor_util
label_desc: Use image node_id 7 for calling a global function with example usage: create_writer_for_run(out_dir, run, suffix) and returns: EventFileWriter