code: def _get_annex_version():
      """Return version of available git-annex"""
      try:
          return _runner.run(
              "git annex version --raw".split(),
              protocol=StdOutErrCapture,
          )["stdout"]
      except CommandError:
          # fall back on method that could work with older installations
          out = _runner.run(
              ["git", "annex", "version"], protocol=StdOutErrCapture
          )
          return out["stdout"].splitlines()[0].split(":")[1].strip()
  
imports: import os.path
  import re
  import sys
  from itertools import chain
  from os import linesep
  from looseversion import LooseVersion
  from datalad.config import get_git_version
  from datalad.log import lgr
  from .exceptions import CapturedException, CommandError
  from datalad.cmd import GitWitlessRunner, StdOutErrCapture, WitlessRunner
  from datalad.support.exceptions import MissingExternalDependency, OutdatedExternalDependency
label_desc: Use image node_id 1 for calling a global function with example usage: _get_annex_version() and returns: _runner, out