code: def _strip_dev(version):
      # First capturing group () is what we want to keep, at the beginning:
      #
      # - at least one numeral, then
      # - repeats of {dot, at least one numeral}
      #
      # The rest (consume to the end of the string) is the stuff we want to cut
      # off:
      #
      # - A period (maybe), then
      # - "dev", "rc", or "+", then
      # - numerals, periods, dashes, and "a" through "g" (hex chars)
      #
      # Thanks https://www.regextester.com !
      exp = r"^([0-9]+(?:\.[0-9]+)*)\.?(?:dev|rc|\+)[0-9+a-g\.\-]+$"
      match = re.match(exp, version)
      return match.groups()[0] if match is not None else version
  
imports: import numbers
  import operator
  import os
  import re
  from builtins import input
  from difflib import get_close_matches
  from importlib import import_module
  from pathlib import Path
  import numpy
  from ..defaults import HEAD_SIZE_DEFAULT, _handle_default
  from ..fixes import _compare_version, _median_complex
  from ._logging import _record_warnings, _verbose_safe_false, logger, verbose, warn
label_desc: Use image node_id 5 for calling a global function with example usage: _strip_dev(version) and returns: unknown