code: def test_lbfgsb():
      p_true = Parameters()
      p_true.add("amp", value=14.0)
      p_true.add("period", value=5.33)
      p_true.add("shift", value=0.123)
      p_true.add("decay", value=0.010)
  
      def residual(pars, x, data=None):
          amp = pars["amp"]
          per = pars["period"]
          shift = pars["shift"]
          decay = pars["decay"]
  
          if abs(shift) > pi / 2:
              shift = shift - np.sign(shift) * pi
          model = (
              amp
              * np.sin(shift + x / per)
              * np.exp(-x * x * decay * decay)
          )
          if data is None:
              return model
          return model - data
  
      n = 2500
      xmin = 0.0
      xmax = 250.0
      noise = np.random.normal(scale=0.7215, size=n)
      x = np.linspace(xmin, xmax, n)
      data = residual(p_true, x) + noise
  
      fit_params = Parameters()
      fit_params.add("amp", value=11.0, min=5, max=20)
      fit_params.add("period", value=5.0, min=1.0, max=7)
      fit_params.add("shift", value=0.10, min=0.0, max=0.2)
      fit_params.add("decay", value=6.0e-3, min=0, max=0.1)
  
      out = minimize(
          residual,
          fit_params,
          method="lbfgsb",
          args=(x,),
          kws={"data": data},
      )
  
      for para, true_para in zip(out.params.values(), p_true.values()):
          check_wo_stderr(para, true_para.value)
  
imports: import sys
  import unittest
  import numpy
  from numpy import pi
  from numpy.testing import assert_allclose, assert_almost_equal, assert_equal
  import pytest
  from scipy.optimize import rosen_der
  from uncertainties import ufloat
  from lmfit import Minimizer, Parameters, minimize
  from lmfit.lineshapes import gaussian
  from lmfit.minimizer import HAS_EMCEE, SCALAR_METHODS, MinimizerResult, coerce_float64
  from lmfit.models import SineModel
label_desc: Use image node_id 5 for calling a global function with example usage: test_lbfgsb() and returns: unknown, model