code: def _get_cub_path():
      # runtime discovery of CUB headers
      from cupy_backends.cuda.api import runtime
  
      current_dir = os.path.dirname(os.path.abspath(__file__))
  
      if not runtime.is_hip:
          if os.path.isdir(
              os.path.join(current_dir, "_core/include/cupy/_cccl/cub")
          ):
              _cub_path = "<bundle>"
          else:
              _cub_path = None
      else:
          # the bundled CUB does not work in ROCm
          rocm_path = get_rocm_path()
          if rocm_path is not None and os.path.isdir(
              os.path.join(rocm_path, "include/hipcub")
          ):
              # use hipCUB
              _cub_path = "<ROCm>"
          else:
              _cub_path = None
      return _cub_path
  
imports: import ctypes
  import importlib.metadata
  import json
  import os
  import os.path
  import re
  import shutil
  import sys
  from typing import Any, Dict, List, Optional, Tuple
  import warnings
label_desc: Use image node_id 11 for calling a global function with example usage: _get_cub_path() and returns: _cub_path