code: def spline_filter(Iin, lmbda=5.0):
      """Smoothing spline (cubic) filtering of a rank-2 array.
  
      Filter an input data set, `Iin`, using a (cubic) smoothing spline of
      fall-off `lmbda`.
  
      Parameters
      ----------
      Iin : array_like
          input data set
      lmbda : float, optional
          spline smooghing fall-off value, default is `5.0`.
  
      Returns
      -------
      res : ndarray
          filtered input data
  
      Examples
      --------
      We can filter an multi dimensional signal (ex: 2D image) using cubic
      B-spline filter:
  
      >>> import numpy as np
      >>> from scipy.signal import spline_filter
      >>> import matplotlib.pyplot as plt
      >>> orig_img = np.eye(20)  # create an image
      >>> orig_img[10, :] = 1.0
      >>> sp_filter = spline_filter(orig_img, lmbda=0.1)
      >>> f, ax = plt.subplots(1, 2, sharex=True)
      >>> for ind, data in enumerate([[orig_img, "original image"],
      ...                             [sp_filter, "spline filter"]]):
      ...     ax[ind].imshow(data[0], cmap='gray_r')
      ...     ax[ind].set_title(data[1])
      >>> plt.tight_layout()
      >>> plt.show()
  
      """
      intype = Iin.dtype.char
      hcol = array([1.0, 4.0, 1.0], "f") / 6.0
      if intype in ["F", "D"]:
          Iin = Iin.astype("F")
          ckr = cspline2d(Iin.real, lmbda)
          cki = cspline2d(Iin.imag, lmbda)
          outr = sepfir2d(ckr, hcol, hcol)
          outi = sepfir2d(cki, hcol, hcol)
          out = (outr + 1j * outi).astype(intype)
      elif intype in ["f", "d"]:
          ckr = cspline2d(Iin, lmbda)
          out = sepfir2d(ckr, hcol, hcol)
          out = out.astype(intype)
      else:
          raise TypeError("Invalid data type for Iin")
      return out
  
file_path: scipy/scipy/signal/_bsplines.py
imports: from numpy import asarray, pi, zeros_like, array, arctan2, tan, ones, arange, floor, r_, atleast_1d, sqrt, exp, greater, cos, add, sin
  from ._spline import cspline2d, sepfir2d
  from ._signaltools import lfilter, sosfilt, lfiltic
  from scipy.interpolate import BSpline
label_desc: Use image node_id 1 for calling a global function with example usage: spline_filter(Iin, lmbda) and returns: out