code: def test_pull_subdir_file(tmp_dir, erepo_dir):
      with erepo_dir.chdir():
          subdir = erepo_dir / "subdir"
          subdir.mkdir()
          (subdir / "file").write_text("contents")
          erepo_dir.dvc_add(subdir / "file", commit="create file")
  
      dest = tmp_dir / "file"
      with external_repo(os.fspath(erepo_dir)) as repo:
          repo.dvcfs.get(
              "subdir/file",
              os.fspath(dest),
          )
  
      assert dest.is_file()
      assert dest.read_text() == "contents"
  
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 5 for calling a global function with example usage: test_pull_subdir_file(tmp_dir, erepo_dir) without return types