code: def _base_version_helper(version: str) -> str:
      import re
  
      VERSION_PAT = re.compile(r"^(\d+\.\d+\.\d+)((?:\.dev|\.rc).*)?")
      match = VERSION_PAT.search(version)
      assert match is not None
      return match.group(1)
  
imports: from __future__ import annotations
  import logging
  from ..None import __version__
label_desc: Use image node_id 3 for calling a global function with example usage: _base_version_helper(version) and returns: match