code: def start(arguments, timeout=datetime.timedelta(seconds=60)):
      """Start a new TensorBoard instance, or reuse a compatible one.
  
      If the cache key determined by the provided arguments and the current
      working directory (see `cache_key`) matches the cache key of a running
      TensorBoard process (see `get_all`), that process will be reused.
  
      Otherwise, a new TensorBoard process will be spawned with the provided
      arguments, using the `tensorboard` binary from the system path.
  
      Args:
        arguments: List of strings to be passed as arguments to
          `tensorboard`. (If you have a raw command-line string, see
          `shlex.split`.)
        timeout: `datetime.timedelta` object describing how long to wait for
          the subprocess to initialize a TensorBoard server and write its
          `TensorBoardInfo` file. If the info file is not written within
          this time period, `start` will assume that the subprocess is stuck
          in a bad state, and will give up on waiting for it and return a
          `StartTimedOut` result. Note that in such a case the subprocess
          will not be killed. Default value is 60 seconds.
  
      Returns:
        A `StartReused`, `StartLaunched`, `StartFailed`, or `StartTimedOut`
        object.
      """
      this_cache_key = cache_key(
          working_directory=os.getcwd(),
          arguments=arguments,
          configure_kwargs={},
      )
      match = _find_matching_instance(this_cache_key)
      if match:
          return StartReused(info=match)
  
      (stdout_fd, stdout_path) = tempfile.mkstemp(
          prefix=".tensorboard-stdout-"
      )
      (stderr_fd, stderr_path) = tempfile.mkstemp(
          prefix=".tensorboard-stderr-"
      )
      start_time_seconds = time.time()
      explicit_tb = os.environ.get("TENSORBOARD_BINARY", None)
      try:
          p = subprocess.Popen(
              ["tensorboard" if explicit_tb is None else explicit_tb]
              + arguments,
              stdout=stdout_fd,
              stderr=stderr_fd,
          )
      except OSError as e:
          return StartExecFailed(
              os_error=e, explicit_binary=explicit_tb
          )
      finally:
          os.close(stdout_fd)
          os.close(stderr_fd)
  
      poll_interval_seconds = 0.5
      end_time_seconds = start_time_seconds + timeout.total_seconds()
      while time.time() < end_time_seconds:
          time.sleep(poll_interval_seconds)
          subprocess_result = p.poll()
          if subprocess_result is not None:
              return StartFailed(
                  exit_code=subprocess_result,
                  stdout=_maybe_read_file(stdout_path),
                  stderr=_maybe_read_file(stderr_path),
              )
          info = _find_matching_instance(this_cache_key)
          if info:
              # Don't check that `info.pid == p.pid`, since on Windows that may
              # not be the case: see #4300.
              return StartLaunched(info=info)
      else:
          return StartTimedOut(pid=p.pid)
  
imports: import base64
  import dataclasses
  import datetime
  import errno
  import json
  import os
  import subprocess
  import tempfile
  import time
  import typing
  from typing import Optional
  from tensorboard import version
  from tensorboard.util import tb_logging
label_desc: Use image node_id 10 for calling a global function with example usage: start(arguments, timeout) and returns: StartReused, StartTimedOut, StartExecFailed, StartFailed, StartLaunched