code: def get_cub_version(formatted=False):
      """Return CUB version cached in check_cub_version()."""
      global _cub_version
      if _cub_version is None:
          msg = "check_cub_version() must be called first."
          raise RuntimeError(msg)
      if formatted:
          if _cub_version == -1:
              return "<unknown>"
          return str(_cub_version)
      return _cub_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 22 for calling a global function with example usage: get_cub_version(formatted) and returns: _cub_version, str, str