code: def get_tensorboard_args(
      tb_version: str, tfevents_dir: str, add_args: List[str]
  ) -> List[str]:
      """Build tensorboard startup args.
  
      Args are added and deprecated at the mercy of tensorboard; all of the below are necessary to
      support versions 1.14, 2.4, and 2.5
  
      - Tensorboard 2+ no longer exposes all ports. Must pass in "--bind_all" to expose localhost
      - Tensorboard 2.5.0 introduces an experimental feature (default load_fast=true)
      which prevents multiple plugins from loading correctly.
      """
      task_id = os.environ["DET_TASK_ID"]
      port = os.environ["TENSORBOARD_PORT"]
  
      tensorboard_args = [
          "tensorboard",
          f"--port={port}",
          f"--path_prefix=/proxy/{task_id}",
          *add_args,
      ]
  
      # Version dependant args
      if version.parse(tb_version) >= version.parse("2"):
          tensorboard_args.append("--bind_all")
      if version.parse(tb_version) >= version.parse("2.5"):
          tensorboard_args.append("--load_fast=false")
  
      tensorboard_args.append(f"--logdir={tfevents_dir}")
  
      return tensorboard_args
  
imports: import json
  import logging
  import os
  import queue
  import subprocess
  import sys
  import tempfile
  import threading
  import time
  from typing import Any, Callable, Dict, List
  import boto3
  import requests
  from packaging import version
  import determined
  import determined.common
  from determined.tensorboard import fetchers
label_desc: Use image node_id 2 for calling a global function with example usage: get_tensorboard_args(tb_version, tfevents_dir, add_args) and returns: tensorboard_args