code: def test_isdvc(tmp_dir, dvc):
      tmp_dir.gen({"foo": "foo", "bar": "bar", "dir": {"baz": "baz"}})
      dvc.add("foo")
      dvc.add("dir")
      fs = DVCFileSystem(repo=dvc)
      assert fs.isdvc("foo")
      assert not fs.isdvc("bar")
      assert fs.isdvc("dir")
      assert fs.isdvc("dir/baz")
      assert fs.isdvc("dir/baz", recursive=True)
  
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 18 for calling a global function with example usage: test_isdvc(tmp_dir, dvc) without return types