code: def test_get_hash_mixed_dir(tmp_dir, scm, dvc):
      tmp_dir.gen({"dir": {"foo": "foo", "bar": "bar"}})
      tmp_dir.dvc.add(os.path.join("dir", "foo"))
      tmp_dir.scm.add(
          [
              os.path.join("dir", "bar"),
              os.path.join("dir", ".gitignore"),
              os.path.join("dir", "foo.dvc"),
          ]
      )
      tmp_dir.scm.commit("add dir")
  
      fs = DVCFileSystem(repo=dvc)
      _, _, obj = build(dvc.cache.local, "dir", fs, "md5")
      if os.name == "nt":
          expected_hash = "0d2086760aea091f1504eafc8843bb18.dir"
      else:
          expected_hash = "e1d9e8eae5374860ae025ec84cfd85c7.dir"
      assert obj.hash_info == HashInfo("md5", expected_hash)
  
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 25 for calling a global function with example usage: test_get_hash_mixed_dir(tmp_dir, scm, dvc) without return types