code: def per_iteration(pars, iteration, resid, *args, **kws):
      """Iteration callback, will abort at iteration 23."""
      return iteration == 17
  
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 2 for calling a global function with example usage: per_iteration(pars, iteration, resid) and returns: unknown