code: def test_used_objs(tmp_dir, dvc, path):
      tmp_dir.dvc_gen(
          {"dir": {"subdir": {"file": "file"}, "other": "other"}}
      )
  
      expected = {
          HashInfo("md5", "70922d6bf66eb073053a82f77d58c536.dir"),
          HashInfo("md5", "8c7dd922ad47494fc02c388e12c00eac"),
      }
  
      used = set()
      for _, obj_ids in dvc.used_objs([path]).items():
          used.update(obj_ids)
  
      assert used == expected
  
file_path: dvc/tests/unit/repo/test_repo.py
imports: import os
  import shutil
  import pytest
  from dvc.exceptions import OutputDuplicationError
  from dvc.repo import NotDvcRepoError, Repo, locked
  from dvc_data.hashfile.hash_info import HashInfo
label_desc: Use image node_id 4 for calling a global function with example usage: test_used_objs(tmp_dir, dvc, path) without return types