code: def _get_ssh_version(exe=None):
      """Return version of ssh
  
      Annex prior 20170302 was using bundled version, then across all systems
      we used system one if installed, and then switched to the one defined in
      configuration, with system-wide (not default in PATH e.g. from conda)
      "forced" on Windows.  If no specific executable provided in `exe`, we will
      use the one in configuration
      """
      if exe is None:
          from datalad import cfg
  
          exe = cfg.obtain("datalad.ssh.executable")
      out = _runner.run([exe, "-V"], protocol=StdOutErrCapture)
      # apparently spits out to err but I wouldn't trust it blindly
      stdout = out["stdout"]
      if out["stderr"].startswith("OpenSSH"):
          stdout = out["stderr"]
      match = re.match(
          "OpenSSH.*_([0-9][0-9]*)\\.([0-9][0-9]*)(p([0-9][0-9]*))?",
          stdout,
      )
      if match:
          return "{}.{}p{}".format(
              match.groups()[0], match.groups()[1], match.groups()[3]
          )
      raise AssertionError(f"no OpenSSH client found: {stdout}")
  
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 5 for calling a global function with example usage: _get_ssh_version(exe) and returns: str