code: def minimizerGaussian(modelGaussian):
      """Return a Mininizer class for the Gaussian + Linear model."""
      x, y, _, pars = modelGaussian
  
      def residual(params, x, y):
          pars = params.valuesdict()
          model = (
              gaussian(
                  x,
                  pars["peak_amplitude"],
                  pars["peak_center"],
                  pars["peak_sigma"],
              )
              + pars["bkg_intercept"]
              + x * pars["bkg_slope"]
          )
          return y - model
  
      mini = Minimizer(residual, pars, fcn_args=(x, y))
  
      return mini
  
file_path: lmfit-py/tests/test_max_nfev.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 2 for calling a global function with example usage: minimizerGaussian(modelGaussian) and returns: mini, unknown