code: def dir_watcher(settings, file_pusher, tempdir: Path) -> DirWatcher:
      with patch.object(
          wandb.filesync.dir_watcher, "wd_polling", Mock()
      ):
          yield DirWatcher(
              settings=settings,
              file_pusher=file_pusher,
              file_dir=str(tempdir),
          )
  
imports: import os
  import tempfile
  import time
  from pathlib import Path
  from typing import TYPE_CHECKING, Callable
  from unittest.mock import Mock, patch
  import pytest
  import wandb.filesync.dir_watcher
  from wandb.filesync.dir_watcher import DirWatcher, PolicyEnd, PolicyLive, PolicyNow
  from wandb.sdk.internal.file_pusher import FilePusher
label_desc: Use image node_id 4 for calling a global function with example usage: dir_watcher(settings, file_pusher, tempdir) without return types