code: def _get_spline_mode(mode):
      """spline boundary mode for interpolation with order >= 2."""
      if mode in ["mirror", "reflect", "grid-wrap"]:
          # exact analytic boundary conditions exist for these modes.
          return mode
      elif mode == "grid-mirror":
          # grid-mirror is a synonym for 'reflect'
          return "reflect"
      # No exact analytical spline boundary condition implemented. Reflect gives
      # lower error than using mirror or wrap for mode 'nearest'. Otherwise, a
      # mirror spline boundary condition is used.
      return "reflect" if mode == "nearest" else "mirror"
  
file_path: cupy/cupyx/scipy/ndimage/_spline_prefilter_core.py
imports: import functools
  import math
  import operator
  import textwrap
  import cupy
label_desc: Use image node_id 5 for calling a global function with example usage: _get_spline_mode(mode) and returns: unknown, mode, str