code: def test_pass_accept_test(self):
      # test passing a custom accept test
      # makes sure it's being used and ensures all the possible return values
      # are accepted.
      accept_test = MyAcceptTest()
      i = 1
      # there's no point in running it more than a few steps.
      basinhopping(
          func2d,
          self.x0[i],
          minimizer_kwargs=self.kwargs,
          niter=10,
          disp=self.disp,
          accept_test=accept_test,
      )
      assert_(accept_test.been_called)
  
imports: from __future__ import division, print_function, absolute_import
  import copy
  from numpy.testing import assert_almost_equal, assert_equal, assert_
  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
label_desc: Use image node_id 12 for calling the TestBasinHopping obj's underlying member method code with example usage: obj.test_pass_accept_test() without return types