code: def test_bounds_variants(self, locally_biased):
      # test that new and old bounds yield same result
  
      lb = [-6.0, 1.0, -5.0]
      ub = [-1.0, 3.0, 5.0]
      x_opt = np.array([-1.0, 1.0, 0.0])
      bounds_old = list(zip(lb, ub))
      bounds_new = Bounds(lb, ub)
  
      res_old_bounds = direct(
          self.sphere, bounds_old, locally_biased=locally_biased
      )
      res_new_bounds = direct(
          self.sphere, bounds_new, locally_biased=locally_biased
      )
  
      assert res_new_bounds.nfev == res_old_bounds.nfev
      assert res_new_bounds.message == res_old_bounds.message
      assert res_new_bounds.success == res_old_bounds.success
      assert res_new_bounds.nit == res_old_bounds.nit
      assert_allclose(res_new_bounds.x, res_old_bounds.x)
      assert_allclose(res_new_bounds.x, x_opt, rtol=1e-2)
  
imports: from numpy.testing import assert_allclose, assert_array_less
  import pytest
  import numpy
  from scipy.optimize import direct, Bounds
label_desc: Use image node_id 18 for calling the TestDIRECT obj's underlying member method code with example usage: obj.test_bounds_variants(locally_biased) without return types