code: def test_brute_lmfit_vs_scipy_Ns_stepsize(params_lmfit):
      """TEST 4: using finite bounds, using Ns, brute_step for 'x'."""
      # set brute_step for x to 0.15 and reset to None for y and assert result
      params_lmfit["x"].set(brute_step=0.15)
      assert_equal(params_lmfit["x"].brute_step, 0.15)
  
      rranges = (slice(-4, 4, 0.15), (-2, 2))
      ret = optimize.brute(
          func_scipy,
          rranges,
          args=params,
          full_output=True,
          Ns=10,
          finish=None,
      )
      mini = lmfit.Minimizer(func_lmfit, params_lmfit)
      out = mini.minimize(method="brute", Ns=10)
  
      assert_equal(ret[2], out.brute_grid)  # grid identical
      assert_equal(
          ret[3], out.brute_Jout
      )  # function values on grid identical
  
      points_x = np.arange(
          rranges[0].start, rranges[0].stop, rranges[0].step
      ).size
      points_y = 10
      nmb_evals = points_x * points_y
      assert_equal(out.nfev, nmb_evals)
  
      # best-fit values and function value identical
      assert_equal(ret[0][0], out.brute_x0[0])
      assert_equal(ret[0][1], out.brute_x0[1])
      assert_equal(ret[1], out.brute_fval)
  
imports: import pickle
  import numpy
  from numpy.testing import assert_allclose, assert_equal
  import pytest
  from scipy import optimize
  import lmfit
label_desc: Use image node_id 7 for calling a global function with example usage: test_brute_lmfit_vs_scipy_Ns_stepsize(params_lmfit) without return types