code: def test_peakfit():
      def residual(pars, x, data=None):
          g1 = gaussian(x, pars["a1"], pars["c1"], pars["w1"])
          g2 = gaussian(x, pars["a2"], pars["c2"], pars["w2"])
          model = g1 + g2
          if data is None:
              return model
          return model - data
  
      n = 601
      xmin = 0.0
      xmax = 15.0
      noise = np.random.normal(scale=0.65, size=n)
      x = np.linspace(xmin, xmax, n)
  
      org_params = Parameters()
      org_params.add_many(
          ("a1", 12.0, True, None, None, None),
          ("c1", 5.3, True, None, None, None),
          ("w1", 1.0, True, None, None, None),
          ("a2", 9.1, True, None, None, None),
          ("c2", 8.1, True, None, None, None),
          ("w2", 2.5, True, None, None, None),
      )
  
      data = residual(org_params, x) + noise
  
      fit_params = Parameters()
      fit_params.add_many(
          ("a1", 8.0, True, None, 14.0, None),
          ("c1", 5.0, True, None, None, None),
          ("w1", 0.7, True, None, None, None),
          ("a2", 3.1, True, None, None, None),
          ("c2", 8.8, True, None, None, None),
      )
  
      fit_params.add("w2", expr="2.5*w1")
  
      myfit = Minimizer(
          residual, fit_params, fcn_args=(x,), fcn_kws={"data": data}
      )
  
      myfit.prepare_fit()
      out = myfit.leastsq()
      check_paras(out.params, org_params)
  
imports: import sys
  import unittest
  import numpy
  from numpy import pi
  from numpy.testing import assert_allclose, assert_almost_equal, assert_equal
  import pytest
  from scipy.optimize import rosen_der
  from uncertainties import ufloat
  from lmfit import Minimizer, Parameters, minimize
  from lmfit.lineshapes import gaussian
  from lmfit.minimizer import HAS_EMCEE, SCALAR_METHODS, MinimizerResult, coerce_float64
  from lmfit.models import SineModel
label_desc: Use image node_id 7 for calling a global function with example usage: test_peakfit() and returns: unknown, model