code: def test_uninstall_without_super(path=None):
      # a parent dataset with a proper subdataset, and another dataset that
      # is just placed underneath the parent, but not an actual subdataset
      parent = Dataset(path).create()
      sub = parent.create("sub")
      assert_repo_status(parent.path)
      nosub = create(op.join(parent.path, "nosub"))
      assert_repo_status(nosub.path)
      subreport = parent.subdatasets()
      assert_result_count(subreport, 1, path=sub.path)
      assert_result_count(subreport, 0, path=nosub.path)
      # it should be possible to uninstall the proper subdataset, even without
      # explicitly calling the uninstall methods of the parent -- things should
      # be figured out by datalad
      with chpwd(parent.path):
          # check False because revisions are not pushed
          drop(sub.path, what="all", reckless="availability")
      nok_(sub.is_installed())
      # no present subdatasets anymore
      subreport = parent.subdatasets()
      assert_result_count(subreport, 1)
      assert_result_count(subreport, 1, path=sub.path, state="absent")
      assert_result_count(subreport, 0, path=nosub.path)
      # but we should fail on an attempt to uninstall the non-subdataset
      with chpwd(nosub.path):
          assert_raises(RuntimeError, drop, what="all")
  
imports: import os
  import os.path
  from pathlib import Path
  from unittest.mock import patch
  from datalad.api import Dataset, clone, create, drop
  from datalad.distributed.drop import _detect_nondead_annex_at_remotes, _detect_unpushed_revs
  from datalad.support.exceptions import IncompleteResultsError, NoDatasetFound
  from datalad.support.gitrepo import GitRepo
  from datalad.tests.utils_pytest import DEFAULT_BRANCH, DEFAULT_REMOTE, OBSCURE_FILENAME, assert_in, assert_in_results, assert_raises, assert_repo_status, assert_result_count, assert_status, eq_, get_deeply_nested_structure, known_failure_githubci_win, nok_, ok_, with_tempfile
  from datalad.utils import chpwd
label_desc: Use image node_id 12 for calling a global function with example usage: test_uninstall_without_super(path) without return types