code: def _check_mode(mode):
      if mode not in (
          "reflect",
          "constant",
          "nearest",
          "mirror",
          "wrap",
          "grid-mirror",
          "grid-wrap",
          "grid-reflect",
      ):
          msg = f"boundary mode not supported (actual: {mode})"
          raise RuntimeError(msg)
      return mode
  
file_path: cupy/cupyx/scipy/ndimage/_util.py
imports: import warnings
  import numpy
  import cupy
label_desc: Use image node_id 8 for calling a global function with example usage: _check_mode(mode) and returns: mode