code: def _get_correlate_kernel(mode, w_shape, int_type, offsets, cval):
      return _filters_core._generate_nd_kernel(
          "correlate",
          "W sum = (W)0;",
          "sum += cast<W>({value}) * wval;",
          "y = cast<Y>(sum);",
          mode,
          w_shape,
          int_type,
          offsets,
          cval,
          ctype="W",
      )
  
imports: import numpy
  import cupy
  from cupy import _core
  from cupy._core import internal
  from cupyx.scipy.ndimage import _util
  from cupyx.scipy.ndimage import _filters_core
  from cupyx.scipy.ndimage import _filters_generic
label_desc: Use image node_id 6 for calling a global function with example usage: _get_correlate_kernel(mode, w_shape, int_type, offsets, cval) and returns: _filters_core