code: def import_cupy() -> types.ModuleType:
      """Import cupy."""
      if not is_cupy_available():
          raise ImportError(
              "`cupy` is required for handling CUDA buffer."
          )
  
      import cupy  # pylint: disable=import-error
  
      return cupy
  
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 5 for calling a global function with example usage: import_cupy() and returns: cupy