code: def is_cupy_available() -> bool:
      """Check cupy package available or not"""
      if importlib.util.find_spec("cupy") is None:
          return False
      try:
          import cupy
  
          return True
      except ImportError:
          return False
  
file_path: xgboost/python-package/xgboost/compat.py
imports: import importlib.util
  import logging
  import sys
  import types
  from typing import Any, Dict, List, Optional, Sequence, cast
  import numpy
  from ._typing import _T
label_desc: Use image node_id 4 for calling a global function with example usage: is_cupy_available() and returns: False, True, False