code: def test_subrepos_are_ignored_for_git_tracked_dirs(
      tmp_dir, erepo_dir
  ):
      subrepo = erepo_dir / "dir" / "subrepo"
      make_subrepo(subrepo, erepo_dir.scm)
      with erepo_dir.chdir():
          scm_files = {
              "foo": "foo",
              "bar": "bar",
              "subdir": {"lorem": "lorem"},
          }
          erepo_dir.scm_gen({"dir": scm_files}, commit="add scm dir")
  
      with subrepo.chdir():
          subrepo.dvc_gen(
              {"file": "file"}, commit="add files on subrepo"
          )
  
      with external_repo(os.fspath(erepo_dir)) as repo:
          repo.dvcfs.get(
              "dir",
              os.fspath(tmp_dir / "out"),
          )
          # subrepo files should not be here
          assert (tmp_dir / "out").read_text() == scm_files
  
file_path: dvc/tests/func/test_external_repo.py
imports: import os
  from dvc.repo.open_repo import CLONES
  from dvc.repo.open_repo import _external_repo
  from dvc.scm import Git
  from dvc.testing.tmp_dir import make_subrepo
  from dvc.utils import relpath
  from dvc.utils.fs import remove
  from dvc_data.hashfile.build import build
  from dvc_data.hashfile.transfer import transfer
label_desc: Use image node_id 10 for calling a global function with example usage: test_subrepos_are_ignored_for_git_tracked_dirs(tmp_dir, erepo_dir) without return types