code: def test_uvars_calc_with_param_def():
      """test using uvars with a defined constraint parameter during the fit"""
      pars = nist_model.make_params(
          g1_center=110,
          g1_amplitude=4000,
          g1_sigma=25,
          g2_center=160,
          g2_amplitude=2000,
          g2_sigma=20,
          exp_amplitude=50,
          exp_decay=75,
      )
  
      pars.add("area", expr="g1_amplitude + g2_amplitude")
      out = nist_model.fit(y, pars, x=x)
  
      assert out.nfev > 25
      assert out.errorbars
      assert out.chisqr > 1000
      assert out.chisqr < 3000
  
      post_area = out.params["area"]
  
      assert post_area.value > 6500
      assert post_area.value < 7000
  
      assert post_area.stderr > 43
      assert post_area.stderr < 48
  
file_path: lmfit-py/tests/test_params_uvars.py
imports: import os
  import numpy
  from lmfit import create_params, minimize
  from lmfit.models import ExponentialModel, GaussianModel
label_desc: Use image node_id 2 for calling a global function with example usage: test_uvars_calc_with_param_def() without return types