code: def test_remove_subdataset_nomethod(path=None):
      ds = Dataset(path).create()
      ds.create("subds")
      with chpwd(path):
          # fails due to unique state
          res = remove("subds", on_failure="ignore")
          assert_in_results(
              res, action="uninstall", status="error", type="dataset"
          )
          res = remove(
              "subds", reckless="availability", on_failure="ignore"
          )
          assert_in_results(
              res, action="uninstall", status="ok", type="dataset"
          )
          assert_in_results(res, action="remove", status="ok")
          assert_in_results(res, action="save", status="ok")
  
file_path: datalad/datalad/local/tests/test_remove.py
imports: import os.path
  from datalad.api import clone, remove
  from datalad.distribution.dataset import Dataset
  from datalad.tests.utils_pytest import assert_in, assert_in_results, assert_not_in, assert_not_in_results, assert_raises, assert_repo_status, assert_result_count, assert_status, chpwd, create_tree, eq_, get_deeply_nested_structure, nok_, ok_, with_tempfile, with_tree
label_desc: Use image node_id 2 for calling a global function with example usage: test_remove_subdataset_nomethod(path) without return types