code: def test_pull_imported_stage_from_subrepos(
      tmp_dir, dvc, erepo_dir, is_dvc, files
  ):
      subrepo = erepo_dir / "subrepo"
      make_subrepo(subrepo, erepo_dir.scm)
      gen = subrepo.dvc_gen if is_dvc else subrepo.scm_gen
      with subrepo.chdir():
          gen(files, commit="files in subrepo")
  
      key = first(files)
      path = os.path.join("subrepo", key)
      dvc.imp(os.fspath(erepo_dir), path, out="out")
  
      # clean everything
      dvc.cache.local.clear()
      remove("out")
  
      stats = dvc.pull(["out.dvc"])
  
      expected = (
          [f"out{os.sep}"] if isinstance(files[key], dict) else ["out"]
      )
      assert stats["added"] == expected
      assert (tmp_dir / "out").read_text() == files[key]
  
imports: import filecmp
  import os
  import pytest
  from funcy import first
  from dvc.cachemgr import CacheManager
  from dvc.config import NoRemoteError
  from dvc.dvcfile import load_file
  from dvc.fs import system
  from dvc.scm import Git
  from dvc.stage.exceptions import StagePathNotFoundError
  from dvc.testing.tmp_dir import make_subrepo
  from dvc.utils.fs import remove
  from dvc_data.index.index import DataIndexDirError
label_desc: Use image node_id 29 for calling a global function with example usage: test_pull_imported_stage_from_subrepos(tmp_dir, dvc, erepo_dir, is_dvc, files) without return types