code: def test_simple():
      # create data to be fitted
      np.random.seed(1)
      x = np.linspace(0, 15, 301)
      data = 5.0 * np.sin(2 * x - 0.1) * np.exp(
          -x * x * 0.025
      ) + np.random.normal(size=len(x), scale=0.2)
  
      # define objective function: returns the array to be minimized
      def fcn2min(params, x, data):
          """model decaying sine wave, subtract data"""
          amp = params["amp"]
          shift = params["shift"]
          omega = params["omega"]
          decay = params["decay"]
  
          model = (
              amp * np.sin(x * omega + shift) * np.exp(-x * x * decay)
          )
          return model - data
  
      # create a set of Parameters
      params = Parameters()
      params.add("amp", value=10, min=0)
      params.add("decay", value=0.1)
      params.add("shift", value=0.0, min=-pi / 2.0, max=pi / 2)
      params.add("omega", value=3.0)
  
      # do fit, here with leastsq model
      result = minimize(fcn2min, params, args=(x, data))
  
      # assert that the real parameters are found
      for para, val in zip(result.params.values(), [5, 0.025, -0.1, 2]):
          check(para, val)
  
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 4 for calling a global function with example usage: test_simple() and returns: unknown