code: def _pre_drop_checks(ds, repo, paths, what, reckless, is_annex):
      if not is_annex and reckless not in ("datasets", "kill"):
          # we cannot drop content in non-annex repos, issue same
          # 'notneeded' as for git-file in annex repo
          for p in paths or [ds.path]:
              yield dict(
                  action="drop",
                  path=str(p),
                  status="notneeded",
                  message="no annex'ed content",
              )
          # continue, this is nothing fatal
  
      if (
          not is_annex
          and what in ("allkeys", "unwanted")
          and not reckless == "kill"
      ):
          # these drop modes are meaningless without an annex
          yield dict(
              action="drop",
              path=ds.path,
              status="notneeded",
              message="dataset with no annex",
              type="dataset",
          )
  
imports: import logging
  from itertools import chain
  import warnings
  from datalad.core.local.status import get_paths_by_ds
  from datalad.distribution.dataset import Dataset, EnsureDataset, datasetmethod, require_dataset
  from datalad.interface.base import Interface, build_doc, eval_results
  from datalad.interface.common_opts import jobs_opt, recursion_flag, recursion_limit
  from datalad.interface.results import annexjson2result, results_from_annex_noinfo, success_status_map
  from datalad.runner.exception import CommandError
  from datalad.support.annexrepo import AnnexRepo
  from datalad.support.constraints import EnsureChoice, EnsureNone, EnsureStr
  from datalad.support.exceptions import CapturedException
  from datalad.support.param import Parameter
  from datalad.utils import ensure_list, rmtree
label_desc: Use image node_id 4 for calling a global function with example usage: _pre_drop_checks(ds, repo, paths, what, reckless, is_annex) without return types