code: def test_acq_optimizer_with_time_api(base_estimator, acq_func):
      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()
  
      with pytest.raises(TypeError) as e:
          opt.tell(x2, bench1(x2))
  
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 13 for calling a global function with example usage: test_acq_optimizer_with_time_api(base_estimator, acq_func) without return types