code: def test_bounds_checking_2D():
      low = -2.0
      high = 2.0
      base_estimator = ExtraTreesRegressor(random_state=2)
      opt = Optimizer(
          [(low, high), (low + 4, high + 4)],
          base_estimator,
          n_initial_points=1,
          acq_optimizer="sampling",
      )
  
      assert_raises(ValueError, opt.tell, [high + 0.5, high + 4.5], 2.0)
      assert_raises(ValueError, opt.tell, [low - 0.5, low - 4.5], 2.0)
  
      # first out, second in
      assert_raises(ValueError, opt.tell, [high + 0.5, high + 0.5], 2.0)
      assert_raises(ValueError, opt.tell, [low - 0.5, high + 0.5], 2.0)
  
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 6 for calling a global function with example usage: test_bounds_checking_2D() without return types