code: def build_hex_version(version_string):
      """
      Parse and translate '4.3a1' into the readable hex representation '0x040300A1' (like PY_VERSION_HEX).
      """
      # First, parse '4.12a1' into [4, 12, 0, 0xA01].
      digits = []
      release_status = 0xF0
      for digit in re.split("([.abrc]+)", version_string):
          if digit in ("a", "b", "rc"):
              release_status = {"a": 0xA0, "b": 0xB0, "rc": 0xC0}[digit]
              digits = (digits + [0, 0])[:3]  # 1.2a1 -> 1.2.0a1
          elif digit != ".":
              digits.append(int(digit))
      digits = (digits + [0] * 3)[:4]
      digits[3] += release_status
  
      # Then, build a single hex value, two hex digits per version part.
      hexversion = 0
      for digit in digits:
          hexversion = (hexversion << 8) + digit
  
      return "0x%08X" % hexversion
  
imports: from __future__ import absolute_import
  import os
  import sys
  import re
  import io
  import codecs
  import shutil
  import tempfile
  from contextlib import contextmanager
label_desc: Use image node_id 26 for calling a global function with example usage: build_hex_version(version_string) and returns: unknown