code: def _get_non_existing_from_annex_output(output: str) -> list[str]:
      """This parses annex' output for messages about non-existing paths
      and returns a list of such paths (as strings).
  
      Internal helper for `_call_annex_records`.
      """
  
      # This should cease to exist whenever annex provides an actual API
      # for retrieving such information;
      # see https://git-annex.brachable.com/todo/api_for_telling_when_nonexistant_or_non_git_files_passed/
  
      # Output largely depends on annex config annex.skipunknown
      # (see https://github.com/datalad/datalad/pull/6510#issuecomment-1054499339)
      # and git-annex' default of annex.skipunknown changed as of 10.20220222.
      # However, that appears to not be true for all commands. annex-add would
      # still report in the "git-annex: ... not found" fashion rather than
      # "error:  ... did not match any file(s) known to git". Depends on
      # what annex is calling internally *and* on that config. Apparently git
      # itself isn't consistent in that regard.
      # Therefore, account for both ways of reporting unknown paths.
  
      unknown_paths = []
      for line in output.splitlines():
          if "did not match any file(s) known to git" in line:
              unknown_paths.append(line[17:-40])
          elif line.startswith("git-annex:") and line.endswith(
              " not found"
          ):
              unknown_paths.append(line[11:-10])
  
      return unknown_paths
  
imports: from __future__ import annotations
  from datalad.utils import ensure_list
label_desc: Use image node_id 2 for calling a global function with example usage: _get_non_existing_from_annex_output(output) and returns: unknown_paths