code: def test_subds_path(path=None):
      # a dataset with a subdataset with a file, all neatly tracked
      ds = Dataset(path).create()
      subds = ds.create("sub")
      assert_repo_status(path)
      with (subds.pathobj / "some.txt").open("w") as f:
          f.write("test")
      ds.save(recursive=True)
      assert_repo_status(path)
  
      # querying the toplevel dataset repo for a subdspath should
      # report the subdataset record in the dataset
      # (unlike `git status`, which is silent for subdataset paths),
      # but definitely not report the subdataset as deleted
      # https://github.com/datalad/datalad-revolution/issues/17
      stat = ds.repo.status(paths=[op.join("sub", "some.txt")])
      assert_equal(list(stat.keys()), [subds.repo.pathobj])
      assert_equal(stat[subds.repo.pathobj]["state"], "clean")
  
file_path: datalad/datalad/support/tests/test_fileinfo.py
imports: import os.path
  from pathlib import Path
  import datalad.utils
  from datalad.distribution.dataset import Dataset
  from datalad.support.exceptions import NoSuchPathError
  from datalad.support.gitrepo import GitRepo
  from datalad.tests.utils_pytest import assert_dict_equal, assert_equal, assert_false, assert_in, assert_not_in, assert_raises, assert_repo_status, get_annexstatus, get_convoluted_situation, known_failure_githubci_win, on_nfs, on_travis, slow, skip_if, with_tempfile, with_tree
label_desc: Use image node_id 3 for calling a global function with example usage: test_subds_path(path) without return types