code: def test_max_fun_no_ls(self):
      ret = dual_annealing(
          self.func,
          self.ld_bounds,
          no_local_search=True,
          maxfun=500,
          seed=self.seed,
      )
      assert ret.nfev <= 500
      assert not ret.success
  
imports: from scipy.optimize import dual_annealing, Bounds
  from scipy.optimize._dual_annealing import EnergyState
  from scipy.optimize._dual_annealing import LocalSearchWrapper
  from scipy.optimize._dual_annealing import ObjectiveFunWrapper
  from scipy.optimize._dual_annealing import StrategyChain
  from scipy.optimize._dual_annealing import VisitingDistribution
  from scipy.optimize import rosen, rosen_der
  import pytest
  import numpy
  from numpy.testing import assert_equal, assert_allclose, assert_array_less
  from pytest import raises
  from scipy._lib._util import check_random_state
label_desc: Use image node_id 22 for calling the TestDualAnnealing obj's underlying member method code with example usage: obj.test_max_fun_no_ls() without return types