code: def test_confidence_with_trace(data, pars):
      """Test calculation of confidence intervals with trace."""
      minimizer = lmfit.Minimizer(residual, pars, fcn_args=data)
      out = minimizer.leastsq()
  
      ci, tr = lmfit.conf_interval(
          minimizer, out, sigmas=[0.6827], trace=True
      )
      for p in out.params:
          diff1 = ci[p][1][1] - ci[p][0][1]
          diff2 = ci[p][2][1] - ci[p][1][1]
          stderr = out.params[p].stderr
          assert abs(diff1 - stderr) / stderr < 0.05
          assert abs(diff2 - stderr) / stderr < 0.05
  
          assert p in tr.keys()
          assert "prob" in tr[p].keys()
  
imports: import copy
  import numpy
  from numpy.testing import assert_allclose
  import pytest
  from scipy.stats import f
  import lmfit
label_desc: Use image node_id 12 for calling a global function with example usage: test_confidence_with_trace(data, pars) without return types