code: def test_ampgo_maxfunevals(minimizer_Alpine02):
      """Test AMPGO algorithm with maxfunevals."""
      # disp to False for L-BFGS-B to avoid too much output...
      kws = {
          "maxfunevals": 5,
          "disp": True,
          "local_opts": {"disp": False},
      }
      out = minimizer_Alpine02.minimize(method="ampgo", **kws)
  
      assert (
          out.ampgo_msg
          == "Maximum number of function evaluations exceeded"
      )
  
file_path: lmfit-py/tests/test_ampgo.py
imports: import numpy
  from numpy.testing import assert_allclose
  import pytest
  import lmfit
  from lmfit._ampgo import ampgo, tunnel
label_desc: Use image node_id 4 for calling a global function with example usage: test_ampgo_maxfunevals(minimizer_Alpine02) without return types