code: def _cubic_smooth_coeff(signal, lamb):
      rho, omega = _coeff_smooth(lamb)
      cs = 1 - 2 * rho * cupy.cos(omega) + rho * rho
      K = len(signal)
      yp = cupy.zeros((K,), signal.dtype.char)
      k = cupy.arange(K)
  
      state_0 = _hc(0, cs, rho, omega) * signal[0] + cupy.sum(
          _hc(k + 1, cs, rho, omega) * signal
      )
      state_1 = (
          _hc(0, cs, rho, omega) * signal[0]
          + _hc(1, cs, rho, omega) * signal[1]
          + cupy.sum(_hc(k + 2, cs, rho, omega) * signal)
      )
  
      zi = cupy.r_[0, 0, state_0, state_1]
      zi = cupy.atleast_2d(zi)
  
      coef = cupy.r_[cs, 0, 0, 1, -2 * rho * cupy.cos(omega), rho * rho]
      coef = cupy.atleast_2d(coef)
  
      # Forward pass:
      #
      # yp[0] = (_hc(0, cs, rho, omega) * signal[0] +
      #          cupy.sum(_hc(k + 1, cs, rho, omega) * signal))
      # yp[1] = (_hc(0, cs, rho, omega) * signal[0] +
      #          _hc(1, cs, rho, omega) * signal[1] +
      #          cupy.sum(_hc(k + 2, cs, rho, omega) * signal))
      # for n in range(2, K):
      #     yp[n] = (cs * signal[n] + 2 * rho * cupy.cos(omega) * yp[n - 1] -
      #              rho * rho * yp[n - 2])
  
      yp, _ = apply_iir_sos(signal[2:], coef, zi=zi, dtype=signal.dtype)
      yp = cupy.r_[state_0, state_1, yp]
  
      # Reverse pass:
      #
      # y[K - 1] = cupy.sum((_hs(k, cs, rho, omega) +
      #                      _hs(k + 1, cs, rho, omega)) * signal[::-1])
      # y[K - 2] = cupy.sum((_hs(k - 1, cs, rho, omega) +
      #                      _hs(k + 2, cs, rho, omega)) * signal[::-1])
      # for n in range(K - 3, -1, -1):
      #     y[n] = (cs * yp[n] + 2 * rho * cupy.cos(omega) * y[n + 1] -
      #             rho * rho * y[n + 2])
  
      state_0 = cupy.sum(
          (_hs(k, cs, rho, omega) + _hs(k + 1, cs, rho, omega))
          * signal[::-1]
      )
      state_1 = cupy.sum(
          (_hs(k - 1, cs, rho, omega) + _hs(k + 2, cs, rho, omega))
          * signal[::-1]
      )
  
      zi = cupy.r_[0, 0, state_0, state_1]
      zi = cupy.atleast_2d(zi)
  
      y, _ = apply_iir_sos(yp[-3::-1], coef, zi=zi, dtype=signal.dtype)
      y = cupy.r_[y[::-1], state_1, state_0]
      return y
  
imports: import cupy
  import cupyx.scipy.ndimage
  from cupyx.scipy.signal._iir_utils import apply_iir_sos
  from cupyx.scipy.signal._splines import _symiirorder1_nd, _symiirorder2_nd
  from cupyx.scipy.interpolate._bspline import BSpline
  import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: _cubic_smooth_coeff(signal, lamb) and returns: y