code: def test_walk_dir(tmp_dir, dvc):
      tmp_dir.gen(
          {
              "dir": {
                  "subdir1": {"foo1": "foo1", "bar1": "bar1"},
                  "subdir2": {"foo2": "foo2"},
                  "foo": "foo",
                  "bar": "bar",
              }
          }
      )
  
      dvc.add("dir")
      fs = DataFileSystem(index=dvc.index.data["repo"])
  
      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"):
          for entry in dirs + files:
              actual.append(posixpath.join(root, entry))
  
      assert set(actual) == set(expected)
      assert len(actual) == len(expected)
  
imports: import posixpath
  import shutil
  import pytest
  import dvc_data
  from dvc.fs import localfs
  from dvc.fs.data import DataFileSystem
  from dvc.utils.fs import remove
  from dvc_data.hashfile.build import build
  from dvc_data.hashfile.hash_info import HashInfo
label_desc: Use image node_id 11 for calling a global function with example usage: test_walk_dir(tmp_dir, dvc) without return types