code: def __init__(
      self,
      settings: "SettingsStatic",
      file_pusher: "FilePusher",
      file_dir: Optional[PathStr] = None,
  ) -> None:
      self._file_count = 0
      self._dir = file_dir or settings.files_dir
      self._settings = settings
      self._savename_file_policies: MutableMapping[
          LogicalPath, PolicyName
      ] = {}
      self._user_file_policies: Mapping[
          PolicyName, MutableSet[GlobStr]
      ] = {
          "end": set(),
          "live": set(),
          "now": set(),
      }
      self._file_pusher = file_pusher
      self._file_event_handlers: MutableMapping[
          LogicalPath, FileEventHandler
      ] = {}
      self._file_observer = wd_polling.PollingObserver()
      self._file_observer.schedule(
          self._per_file_event_handler(), self._dir, recursive=True
      )
      self._file_observer.start()
      logger.info("watching files in: %s", settings.files_dir)
  
imports: import abc
  import fnmatch
  import glob
  import logging
  import os
  import queue
  import time
  from typing import TYPE_CHECKING, Any, Mapping, MutableMapping, MutableSet, Optional
  from wandb import util
  from wandb.sdk.interface.interface import GlobStr
  from wandb.sdk.lib.paths import LogicalPath
label_desc: Use image node_id 1 to create a new DirWatcher object  with example: obj = DirWatcher(settings, file_pusher, file_dir)