code: def residual(pars, x, data):
      parvals = pars.valuesdict()
      gauss = gaussian(
          x,
          parvals["peak_amplitude"],
          parvals["peak_center"],
          parvals["peak_sigma"],
      )
      linear = parvals["bkg_slope"] * x + parvals["bkg_intercept"]
      return data - gauss - linear
  
file_path: lmfit-py/tests/test_itercb.py
imports: import numpy
  import pytest
  from lmfit.lineshapes import gaussian
  from lmfit.minimizer import Minimizer
  from lmfit.models import GaussianModel, LinearModel
label_desc: Use image node_id 1 for calling a global function with example usage: residual(pars, x, data) and returns: unknown