code: def test_policynow_uploads_on_modified_iff_not_already_uploaded(
      tempdir: Path, file_pusher: Mock
  ):
      f = tempdir / "my-file.txt"
      write_with_mtime(f, b"content", mtime=0)
      policy = PolicyNow(str(f), f.name, file_pusher)
  
      policy.on_modified()
      file_pusher.file_changed.assert_called()
      file_pusher.reset_mock()
      write_with_mtime(f, b"content", mtime=99999)
      policy.on_modified()
      file_pusher.file_changed.assert_not_called()
  
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 18 for calling a global function with example usage: test_policynow_uploads_on_modified_iff_not_already_uploaded(tempdir, file_pusher) without return types