code: def test_report_absent_keys(path=None):
      ds = Dataset(path).create()
      # create an annexed file
      testfile = ds.pathobj / "dummy"
      testfile.write_text("nothing")
      ds.save()
      # present in a full report and in a partial report
      # based on worktree of HEAD ref
      for ai in (
          ds.repo.get_content_annexinfo(eval_availability=True),
          ds.repo.get_content_annexinfo(
              paths=["dummy"], eval_availability=True
          ),
          ds.repo.get_content_annexinfo(
              ref="HEAD", eval_availability=True
          ),
          ds.repo.get_content_annexinfo(
              ref="HEAD", paths=["dummy"], eval_availability=True
          ),
      ):
          assert_in(testfile, ai)
          assert_equal(ai[testfile]["has_content"], True)
      # drop the key, not available anywhere else
      ds.drop("dummy", reckless="kill")
      # does not change a thing, except the key is gone
      for ai in (
          ds.repo.get_content_annexinfo(eval_availability=True),
          ds.repo.get_content_annexinfo(
              paths=["dummy"], eval_availability=True
          ),
          ds.repo.get_content_annexinfo(
              ref="HEAD", eval_availability=True
          ),
          ds.repo.get_content_annexinfo(
              ref="HEAD", paths=["dummy"], eval_availability=True
          ),
      ):
          assert_in(testfile, ai)
          assert_equal(ai[testfile]["has_content"], False)
      # make sure files with URL keys are correctly reported:
      from datalad.conftest import test_http_server
  
      remote_file_name = "imaremotefile.dat"
      local_file_name = "mehasurlkey"
      (Path(test_http_server.path) / remote_file_name).write_text(
          "weee"
      )
      remote_file_url = f"{test_http_server.url}/{remote_file_name}"
      # we need to get a file with a URL key and check its local availability
      ds.repo.call_annex(
          [
              "addurl",
              "--relaxed",
              remote_file_url,
              "--file",
              local_file_name,
          ]
      )
      ds.save("URL keys!")
      # should not be there
      res = ds.repo.get_file_annexinfo(
          local_file_name, eval_availability=True
      )
      assert_equal(res["has_content"], False)
      ds.get(local_file_name)
      # should be there
      res = ds.repo.get_file_annexinfo(
          local_file_name, eval_availability=True
      )
      assert_equal(res["has_content"], True)
  
file_path: datalad/datalad/support/tests/test_fileinfo.py
imports: import os.path
  from pathlib import Path
  import datalad.utils
  from datalad.distribution.dataset import Dataset
  from datalad.support.exceptions import NoSuchPathError
  from datalad.support.gitrepo import GitRepo
  from datalad.tests.utils_pytest import assert_dict_equal, assert_equal, assert_false, assert_in, assert_not_in, assert_raises, assert_repo_status, get_annexstatus, get_convoluted_situation, known_failure_githubci_win, on_nfs, on_travis, slow, skip_if, with_tempfile, with_tree
label_desc: Use image node_id 4 for calling a global function with example usage: test_report_absent_keys(path) without return types