code: def test_defaults_are_equivalent():
      # check that the defaults of Optimizer reproduce the defaults of
      # gp_minimize
      space = [(-5.0, 10.0), (0.0, 15.0)]
      # opt = Optimizer(space, 'ET', acq_func="EI", random_state=1)
      opt = Optimizer(space, random_state=1)
  
      for n in range(12):
          x = opt.ask()
          res_opt = opt.tell(x, branin(x))
  
      # res_min = forest_minimize(branin, space, n_calls=12, random_state=1)
      res_min = gp_minimize(branin, space, n_calls=12, random_state=1)
  
      assert res_min.space == res_opt.space
      # tolerate small differences in the points sampled
      assert np.allclose(
          res_min.x_iters, res_opt.x_iters
      )  # , atol=1e-5)
      assert np.allclose(res_min.x, res_opt.x)  # , atol=1e-5)
  
      res_opt2 = opt.get_result()
      assert np.allclose(
          res_min.x_iters, res_opt2.x_iters
      )  # , atol=1e-5)
      assert np.allclose(res_min.x, res_opt2.x)
  
imports: import numpy
  import pytest
  from sklearn.multioutput import MultiOutputRegressor
  from numpy.testing import assert_array_equal
  from numpy.testing import assert_equal
  from numpy.testing import assert_raises
  from skopt import gp_minimize
  from skopt import forest_minimize
  from skopt.benchmarks import bench1, bench1_with_time
  from skopt.benchmarks import branin
  from skopt.learning import ExtraTreesRegressor, RandomForestRegressor
  from skopt.learning import GradientBoostingQuantileRegressor
  from skopt.optimizer import Optimizer
  from scipy.optimize import OptimizeResult
label_desc: Use image node_id 19 for calling a global function with example usage: test_defaults_are_equivalent() without return types