code: def test_policy_on_modified(mocked_live_policy):
      # policy does not save empty files
      mocked_live_policy.on_modified()
      curr_time = time.time()
      assert mocked_live_policy._last_uploaded_size == 0
      assert mocked_live_policy._last_uploaded_time < curr_time
  
      curr_time = time.time()
      # initialize _last_uploaded_size and _last_uploaded_time
      # mocked_live_policy.save_file()
      time.sleep(1.1)
      with open(mocked_live_policy.file_path, "w") as fp:
          fp.write("a" * 1000)
      mocked_live_policy.on_modified()
      # policy saves a file if enough time has passed
      assert mocked_live_policy._last_uploaded_time > curr_time
  
file_path: wandb/tests/pytest_tests/system_tests/test_core/test_save_policies.py
imports: import os
  import time
  import pytest
  from wandb.filesync.dir_watcher import PolicyLive
label_desc: Use image node_id 2 for calling a global function with example usage: test_policy_on_modified(mocked_live_policy) without return types