code: def test_subrepo_walk(tmp_dir, scm, dvc, dvcfiles, extra_expected):
      tmp_dir.scm_gen(
          {"dir": {"repo.txt": "file to confuse DVCFileSystem"}},
          commit="dir/repo.txt",
      )
  
      subrepo1 = tmp_dir / "dir" / "repo"
      subrepo2 = tmp_dir / "dir" / "repo2"
  
      subdirs = [subrepo1, subrepo2]
      for dir_ in subdirs:
          make_subrepo(dir_, scm)
  
      with subrepo1.chdir():
          subrepo1.dvc_gen(
              {"foo": "foo", "dir1": {"bar": "bar"}}, commit="FOO"
          )
      with subrepo2.chdir():
          subrepo2.dvc_gen(
              {"lorem": "lorem", "dir2": {"ipsum": "ipsum"}},
              commit="BAR",
          )
  
      # using fs that does not have dvcignore
      dvc._reset()
      fs = DVCFileSystem(repo=dvc)
      expected = [
          "dir/repo",
          "dir/repo.txt",
          "dir/repo2",
          "dir/repo/.gitignore",
          "dir/repo/foo",
          "dir/repo/dir1",
          "dir/repo/dir1/bar",
          "dir/repo2/.gitignore",
          "dir/repo2/lorem",
          "dir/repo2/dir2",
          "dir/repo2/dir2/ipsum",
      ]
  
      actual = []
      for root, dirs, files in fs.walk(
          "dir",
          dvcfiles=dvcfiles,
          ignore_subrepos=False,
      ):
          for entry in dirs + files:
              actual.append(posixpath.join(root, entry))
  
      expected += extra_expected
      assert set(actual) == set(expected)
      assert len(actual) == len(expected)
  
imports: import os
  import posixpath
  import shutil
  import pytest
  from fsspec.utils import tokenize
  from dvc.fs import localfs
  from dvc.fs.dvc import DVCFileSystem
  from dvc.testing.tmp_dir import make_subrepo
  from dvc_data.hashfile.build import build
  from dvc_data.hashfile.hash_info import HashInfo
label_desc: Use image node_id 20 for calling a global function with example usage: test_subrepo_walk(tmp_dir, scm, dvc, dvcfiles, extra_expected) without return types