code: def __init__(
      self,
      tbwatcher: "TBWatcher",
      logdir: str,
      save: bool,
      namespace: Optional[str],
      queue: "PriorityQueue",
      force: bool = False,
  ) -> None:
      self.directory_watcher = util.get_module(
          "tensorboard.backend.event_processing.directory_watcher",
          required="Please install tensorboard package",
      )
      # self.event_file_loader = util.get_module(
      #     "tensorboard.backend.event_processing.event_file_loader",
      #     required="Please install tensorboard package",
      # )
      self.tf_compat = util.get_module(
          "tensorboard.compat",
          required="Please install tensorboard package",
      )
      self._tbwatcher = tbwatcher
      self._generator = self.directory_watcher.DirectoryWatcher(
          logdir,
          self._loader(save, namespace),
          self._is_our_tfevents_file,
      )
      self._thread = threading.Thread(target=self._thread_except_body)
      self._first_event_timestamp = None
      self._shutdown = threading.Event()
      self._queue = queue
      self._file_version = None
      self._namespace = namespace
      self._logdir = logdir
      self._hostname = socket.gethostname()
      self._force = force
      self._process_events_lock = threading.Lock()
  
imports: import glob
  import logging
  import os
  import queue
  import socket
  import sys
  import threading
  import time
  from typing import TYPE_CHECKING, Any, Dict, List, Optional
  import wandb
  from wandb import util
  from wandb.sdk.interface.interface import GlobStr
  from wandb.sdk.lib import filesystem
  from wandb.viz import CustomChart
  from .None import run
label_desc: Use image node_id 1 to create a new TBDirWatcher object  with example: obj = TBDirWatcher(tbwatcher, logdir, save, namespace, queue, force)