docstr: Tests setup.
  
  Run tests based on the 1-D and 2-D functions described above.
code: def setup_method(self):
      """Tests setup.
  
      Run tests based on the 1-D and 2-D functions described above.
      """
      self.x0 = (1.0, [1.0, 1.0])
      self.sol = (-0.195, np.array([-0.195, -0.1]))
  
      self.tol = 3  # number of decimal places
  
      self.niter = 100
      self.disp = False
  
      # fix random seed
      np.random.seed(1234)
  
      self.kwargs = {"method": "L-BFGS-B", "jac": True}
      self.kwargs_nograd = {"method": "L-BFGS-B"}
  
imports: import copy
  from numpy.testing import assert_almost_equal, assert_equal, assert_
  import pytest
  from pytest import raises
  import numpy
  from numpy import cos, sin
  from scipy.optimize import basinhopping, OptimizeResult
  from scipy.optimize._basinhopping import Storage, RandomDisplacement, Metropolis, AdaptiveStepsize
  from scipy._lib._pep440 import Version
label_desc: Use image node_id 1 for calling the TestBasinHopping obj's underlying member method code with example usage: obj.setup_method() without return types