code: def test_walk(tmp_dir, dvc, dvcfiles, extra_expected):
      tmp_dir.gen(
          {
              "dir": {
                  "subdir1": {"foo1": "foo1", "bar1": "bar1"},
                  "subdir2": {"foo2": "foo2"},
              }
          }
      )
      dvc.add(localfs.find("dir"))
      tmp_dir.gen({"dir": {"foo": "foo", "bar": "bar"}})
      fs = DVCFileSystem(repo=dvc)
  
      expected = [
          "dir/subdir1",
          "dir/subdir2",
          "dir/subdir1/foo1",
          "dir/subdir1/bar1",
          "dir/subdir2/foo2",
          "dir/foo",
          "dir/bar",
      ]
  
      actual = []
      for root, dirs, files in fs.walk("dir", dvcfiles=dvcfiles):
          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 12 for calling a global function with example usage: test_walk(tmp_dir, dvc, dvcfiles, extra_expected) without return types