code: def test_guess_from_peak2d():
      """Regression test for guess_from_peak2d function (see GH #627)."""
      x = np.linspace(-5, 5)
      y = np.linspace(-5, 5)
      amplitude = 0.8
      centerx = 1.7
      sigmax = 0.3
      centery = 1.3
      sigmay = 0.2
      z = lineshapes.gaussian2d(
          x,
          y,
          amplitude=amplitude,
          centerx=centerx,
          sigmax=sigmax,
          centery=centery,
          sigmay=sigmay,
      )
  
      model = models.Gaussian2dModel()
      guess_increasing_x = model.guess(z, x=x, y=y)
      guess_decreasing_x = model.guess(z[::-1], x=x[::-1], y=y[::-1])
  
      assert guess_increasing_x == guess_decreasing_x
  
      for param, value in zip(
          ["centerx", "centery"], [centerx, centery]
      ):
          assert (
              np.abs((guess_increasing_x[param].value - value) / value)
              < 0.5
          )
  
file_path: lmfit-py/tests/test_builtin_models.py
imports: import inspect
  import numpy
  from numpy.testing import assert_allclose
  import pytest
  from scipy.optimize import fsolve
  from lmfit import lineshapes, models
  from lmfit.models import GaussianModel
label_desc: Use image node_id 7 for calling a global function with example usage: test_guess_from_peak2d() without return types