code: def test_gh_4511_regression(self):
      # This modification of the differential evolution docstring example
      # uses a custom popsize that had triggered an off-by-one error.
      # Because we do not care about solving the optimization problem in
      # this test, we use maxiter=1 to reduce the testing time.
      bounds = [(-5, 5), (-5, 5)]
      # result = differential_evolution(rosen, bounds, popsize=1815,
      #                                 maxiter=1)
  
      # the original issue arose because of rounding error in arange, with
      # linspace being a much better solution. 1815 is quite a large popsize
      # to use and results in a long test time (~13s). I used the original
      # issue to figure out the lowest number of samples that would cause
      # this rounding error to occur, 49.
      differential_evolution(rosen, bounds, popsize=49, maxiter=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 28 for calling the TestDifferentialEvolutionSolver obj's underlying member method code with example usage: obj.test_gh_4511_regression() without return types