code: def per_iteration(pars, iteration, resid, *args, **kws):
      print(
          " ITER ",
          iteration,
          [f"{p.name} = {p.value:.5f}" for p in pars.values()],
      )
  
imports: import matplotlib.pyplot
  from numpy import linspace, random
  from lmfit.lineshapes import gaussian
  from lmfit.models import GaussianModel, LinearModel
label_desc: Use image node_id 1 for calling a global function with example usage: per_iteration(pars, iteration, resid) without return types