code: def test_acq_optimizer_with_time_api(base_estimator, acq_func):
      # TODO: Refactor - Use PyTest
      opt = Optimizer(
          [(-2.0, 2.0)],
          base_estimator=base_estimator,
          acq_func=acq_func,
          acq_optimizer="sampling",
          n_initial_points=2,
      )
      x1 = opt.ask()
      opt.tell(x1, (bench1(x1), 1.0))
      x2 = opt.ask()
      res = opt.tell(x2, (bench1(x2), 2.0))
  
      # `x1` and `x2` are random.
      assert x1 != x2
  
      assert len(res.models) == 1
      assert_array_equal(res.func_vals.shape, (2,))
      assert_array_equal(res.log_time.shape, (2,))
  
      # x3 = opt.ask()
      # TODO: Refactor - Split into separate error test
      with pytest.raises(TypeError):
          opt.tell(x2, bench1(x2))
  
imports: from hyperparameter_hunter.optimization.backends.skopt.engine import Optimizer
  import numpy
  import pytest
  from scipy.optimize import OptimizeResult
  from sklearn.multioutput import MultiOutputRegressor
  from sklearn.utils.testing import assert_array_equal
  from skopt.benchmarks import bench1, bench1_with_time
  from skopt.learning import ExtraTreesRegressor, RandomForestRegressor
  from skopt.learning import GradientBoostingQuantileRegressor
label_desc: Use image node_id 7 for calling a global function with example usage: test_acq_optimizer_with_time_api(base_estimator, acq_func) without return types