code: def test_ignore_resurface_subrepo(tmp_dir, scm, dvc):
      tmp_dir.dvc_gen({"foo": "foo"}, commit="add foo")
      subrepo_dir = tmp_dir / "subdir"
      subrepo_dir.mkdir()
      with subrepo_dir.chdir():
          Repo.init(subdir=True)
          subrepo_dir.gen({"bar": {"bar": "bar"}})
  
      dvc._reset()
  
      files = ["foo"]
      dirs = ["bar"]
      root = os.fspath(subrepo_dir)
      assert dvc.dvcignore(
          root, dirs, files, ignore_subrepos=False
      ) == (
          dirs,
          files,
      )
      assert dvc.dvcignore(root, dirs, files) == ([], [])
  
      assert dvc.dvcignore.is_ignored_dir(
          os.fspath(subrepo_dir / "bar")
      )
      assert not dvc.dvcignore.is_ignored_dir(
          os.fspath(subrepo_dir / "bar"), ignore_subrepos=False
      )
  
imports: import os
  import shutil
  from pathlib import Path
  from typing import List
  import pytest
  from dvc.ignore import DvcIgnore, DvcIgnorePatterns
  from dvc.output import OutputIsIgnoredError
  from dvc.pathspec_math import PatternInfo, merge_patterns
  from dvc.repo import Repo
  from dvc.testing.tmp_dir import TmpDir
  from dvc_data.hashfile.build import IgnoreInCollectedDirError
  from dvc_data.hashfile.utils import get_mtime_and_size
label_desc: Use image node_id 13 for calling a global function with example usage: test_ignore_resurface_subrepo(tmp_dir, scm, dvc) without return types