code: def test_check_ignore_sub_repo(tmp_dir, dvc, capsys):
      tmp_dir.gen(
          {
              DvcIgnore.DVCIGNORE_FILE: "other",
              "dir": {".dvc": {}, "foo": "bar"},
          }
      )
  
      assert (
          main(["check-ignore", "-d", os.path.join("dir", "foo")]) == 0
      )
      out, _ = capsys.readouterr()
      assert (
          "in sub_repo:{}\t{}".format("dir", os.path.join("dir", "foo"))
          in out
      )
  
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 8 for calling a global function with example usage: test_check_ignore_sub_repo(tmp_dir, dvc, capsys) without return types