code: def get_hip_version(formatted: bool = False) -> int:
      """Return ROCm version cached in check_hip_version()."""
      global _hip_version
      if _hip_version is None:
          msg = "check_hip_version() must be called first."
          raise RuntimeError(msg)
      if formatted:
          return str(_hip_version)
      return _hip_version
  
imports: import contextlib
  import os
  import re
  import shlex
  import shutil
  import subprocess
  import sys
  import tempfile
  from typing import List, Set
  import cupy_builder
  import cupy_builder.install_utils
  from cupy_builder import _environment
  from cupy_builder._context import Context
label_desc: Use image node_id 11 for calling a global function with example usage: get_hip_version(formatted) and returns: _hip_version, str