code: def convolve(arr, kernel):
      """Simple convolution of two arrays."""
      npts = min(arr.size, kernel.size)
      pad = np.ones(npts)
      tmp = np.concatenate((pad * arr[0], arr, pad * arr[-1]))
      out = np.convolve(tmp, kernel, mode="valid")
      noff = int((len(out) - npts) / 2)
      return out[noff : noff + npts]
  
imports: import matplotlib.pyplot
  import numpy
  from lmfit import CompositeModel, Model
  from lmfit.lineshapes import gaussian, step
label_desc: Use image node_id 2 for calling a global function with example usage: convolve(arr, kernel) and returns: out