code: def test_dirwatcher_finish_skips_ignoreglob_files(
      tempdir: Path,
      file_pusher: FilePusher,
      dir_watcher: DirWatcher,
      settings,
      ignore: bool,
  ):
      if ignore:
          settings.ignore_globs = ["*.txt"]
  
      f = tempdir / "my-file.txt"
      write_with_mtime(f, b"content", mtime=0)
      dir_watcher.update_policy(str(f), "end")
      dir_watcher.finish()
      assert file_pusher.file_changed.called == (not ignore)
  
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 12 for calling a global function with example usage: test_dirwatcher_finish_skips_ignoreglob_files(tempdir, file_pusher, dir_watcher, settings, ignore) without return types