code: def test_itercb_model_class(method, calc_covar):
      """Test the iteration callback for all solvers."""
      out = mod.fit(
          y,
          pars,
          x=x,
          method=method,
          iter_cb=per_iteration,
          calc_covar=calc_covar,
      )
  
      assert out.nfev == 17
      assert out.aborted
      assert not out.errorbars
      assert not out.success
  
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 3 for calling a global function with example usage: test_itercb_model_class(method, calc_covar) without return types