code: def test_L7(self):
      # Lampinen ([5]) test problem 7
      def f(x):
          x = np.hstack(([0], x))  # 1-indexed to match reference
          fun = (
              5.3578547 * x[3] ** 2
              + 0.8356891 * x[1] * x[5]
              + 37.293239 * x[1]
              - 40792.141
          )
          return fun
  
      def c1(x):
          x = np.hstack(([0], x))  # 1-indexed to match reference
          return [
              85.334407
              + 0.0056858 * x[2] * x[5]
              + 0.0006262 * x[1] * x[4]
              - 0.0022053 * x[3] * x[5],
              80.51249
              + 0.0071317 * x[2] * x[5]
              + 0.0029955 * x[1] * x[2]
              + 0.0021813 * x[3] ** 2,
              9.300961
              + 0.0047026 * x[3] * x[5]
              + 0.0012547 * x[1] * x[3]
              + 0.0019085 * x[3] * x[4],
          ]
  
      N = NonlinearConstraint(c1, [0, 90, 20], [92, 110, 25])
  
      bounds = [(78, 102), (33, 45)] + [(27, 45)] * 3
      constraints = N
  
      res = differential_evolution(
          f,
          bounds,
          strategy="rand1bin",
          seed=1234,
          constraints=constraints,
      )
  
      # using our best solution, rather than Lampinen/Koziel. Koziel solution
      # doesn't satisfy constraints, Lampinen f_opt just plain wrong.
      x_opt = [
          78.00000686,
          33.00000362,
          29.99526064,
          44.99999971,
          36.77579979,
      ]
  
      f_opt = -30665.537578
  
      assert_allclose(f(x_opt), f_opt)
      assert_allclose(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)) >= np.array([0, 90, 20])))
      assert_(np.all(np.array(c1(res.x)) <= np.array([92, 110, 25])))
      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 53 for calling the TestDifferentialEvolutionSolver obj's underlying member method code with example usage: obj.test_L7() and returns: fun, list