code: def test_dirwatcher_finish_uploads_end_files(
      tempdir: Path, file_pusher: FilePusher, dir_watcher: DirWatcher
  ):
      f = tempdir / "my-file.txt"
      write_with_mtime(f, b"content", mtime=0)
      dir_watcher.update_policy(str(f), "end")
      dir_watcher.finish()
      file_pusher.file_changed.assert_called_once_with(
          "my-file.txt", str(f), copy=False
      )
  
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 10 for calling a global function with example usage: test_dirwatcher_finish_uploads_end_files(tempdir, file_pusher, dir_watcher) without return types