code: def _get_system_7z_version():
      """Return version of 7-Zip"""
      out = _runner.run(["7z"], protocol=StdOutErrCapture)
      # reporting in variable order across platforms
      # Linux: 7-Zip [64] 16.02
      # Windows: 7-Zip 19.00 (x86)
      pieces = (
          out["stdout"]
          .strip()
          .split(":", maxsplit=1)[0]
          .strip()
          .split()
      )
      for p in pieces:
          # the one with the dot is the version
          if "." in p:
              return p
      lgr.debug(
          "Could not determine version of 7z from stdout. %s", out
      )
  
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 7 for calling a global function with example usage: _get_system_7z_version() and returns: p