code: def test_check_ignore_non_matching(
      tmp_dir, dvc, non_matching, caplog, capsys
  ):
      tmp_dir.gen(DvcIgnore.DVCIGNORE_FILE, "other")
      if non_matching:
          assert main(["check-ignore", "-d", "-n", "file"]) == 1
      else:
          assert main(["check-ignore", "-d", "file"]) == 1
  
      out, _ = capsys.readouterr()
      assert ("::\tfile\n" in out) is non_matching
  
file_path: dvc/tests/func/test_check_ignore.py
imports: import os
  import pytest
  from dvc.cli import main
  from dvc.ignore import DvcIgnore
label_desc: Use image node_id 3 for calling a global function with example usage: test_check_ignore_non_matching(tmp_dir, dvc, non_matching, caplog, capsys) without return types