code: def test_L9(self):
      # Lampinen ([5]) test problem 9
  
      def f(x):
          x = np.hstack(([0], x))  # 1-indexed to match reference
          return x[1] ** 2 + (x[2] - 1) ** 2
  
      def c1(x):
          x = np.hstack(([0], x))  # 1-indexed to match reference
          return [x[2] - x[1] ** 2]
  
      N = NonlinearConstraint(c1, [-0.001], [0.001])
  
      bounds = [(-1, 1)] * 2
      constraints = N
      res = differential_evolution(
          f,
          bounds,
          strategy="rand1bin",
          seed=1234,
          constraints=constraints,
      )
  
      x_opt = [np.sqrt(2) / 2, 0.5]
      f_opt = 0.75
  
      assert_allclose(f(x_opt), f_opt)
      assert_allclose(np.abs(res.x), x_opt, atol=1e-3)
      assert_allclose(res.fun, f_opt, atol=1e-3)
      assert res.success
      assert_(np.all(np.array(c1(res.x)) >= -0.001))
      assert_(np.all(np.array(c1(res.x)) <= 0.001))
      assert_(np.all(res.x >= np.array(bounds)[:, 0]))
      assert_(np.all(res.x <= np.array(bounds)[:, 1]))
  
imports: import multiprocessing
  import platform
  from scipy.optimize._differentialevolution import DifferentialEvolutionSolver, _ConstraintWrapper
  from scipy.optimize import differential_evolution
  from scipy.optimize._constraints import Bounds, NonlinearConstraint, LinearConstraint
  from scipy.optimize import rosen
  from scipy.sparse import csr_matrix
  from scipy._lib._pep440 import Version
  import numpy
  from numpy.testing import assert_equal, assert_allclose, assert_almost_equal, assert_array_equal, assert_string_equal, assert_, suppress_warnings
  from pytest import raises, warns
  import pytest
label_desc: Use image node_id 55 for calling the TestDifferentialEvolutionSolver obj's underlying member method code with example usage: obj.test_L9() and returns: unknown, list