code: def test_check_ignore(
      tmp_dir, dvc, file, ret, output, caplog, capsys
  ):
      tmp_dir.gen(DvcIgnore.DVCIGNORE_FILE, "ignored")
  
      assert main(["check-ignore", file]) == ret
  
      out, _ = capsys.readouterr()
      assert (file in out) is output
      assert "Having any troubles?" not in caplog.text
  
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 1 for calling a global function with example usage: test_check_ignore(tmp_dir, dvc, file, ret, output, caplog, capsys) without return types