code: def _drop_allkeys(ds, repo, force=False, jobs=None):
      """ """
      assert not (
          repo.dot_git / "annex"
      ).is_symlink(), "Dropping from a symlinked annex is unsupported to prevent data-loss"
  
      cmd = ["drop", "--all"]
      if force:
          cmd.append("--force")
      if jobs:
          cmd.extend(["--jobs", str(jobs)])
  
      try:
          yield from repo._call_annex_records_items_(cmd)
      except CommandError as e:
          # pick up the results captured so far and yield them
          # the error will be amongst them
          yield from e.kwargs.get("stdout_json", [])
  
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 8 for calling a global function with example usage: _drop_allkeys(ds, repo, force, jobs) without return types