code: def test_subdir(M, tmp_dir, scm):
      subrepo = tmp_dir / "sub"
      make_subrepo(subrepo, scm)
  
      with subrepo.chdir():
          subrepo.dvc_gen({"dir": {"foo": "foo"}}, commit="add dir")
          subrepo.dvc_gen("bar", "bar", commit="add foo")
          subrepo.gen("untracked", "untracked")
  
          dvc = subrepo.dvc
          assert dvc.data_status(
              granular=True, untracked_files="all"
          ) == {
              **EMPTY_STATUS,
              "git": M.dict(),
              "unchanged": M.unordered(
                  "bar", join("dir", ""), join("dir", "foo")
              ),
              "untracked": ["untracked"],
          }
  
imports: from os import fspath
  from os.path import join
  import pytest
  from dvc.repo import Repo
  from dvc.repo.data import _transform_git_paths_to_dvc, posixpath_to_os_path
  from dvc.testing.tmp_dir import make_subrepo
  from dvc.utils.fs import remove
label_desc: Use image node_id 11 for calling a global function with example usage: test_subdir(M, tmp_dir, scm) without return types