code: def test_drop_allkeys_result_contains_annex_error_messages(path=None):
      # when calling drop with allkeys, expect git-annex error
      # message(s) to be present in the result record error_message
      ds = Dataset(path).create()
      # mock annex call always yielding error-messages in this dataset
      with patch.object(
          ds.repo, "_call_annex_records_items_"
      ) as mock_call:
          mock_call.return_value = iter(
              [
                  {
                      "command": "drop",
                      "success": False,
                      "error-messages": [
                          "git-annex error message here"
                      ],
                  }
              ]
          )
          assert_in_results(
              ds.drop(what="allkeys", on_failure="ignore"),
              error_message="git-annex error message here",
          )
  
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 15 for calling a global function with example usage: test_drop_allkeys_result_contains_annex_error_messages(path) without return types