code: def test_exhaust_initial_calls(base_estimator):
      # check a model is fitted and used to make suggestions after we added
      # at least n_initial_points via tell()
      opt = Optimizer(
          [(-2.0, 2.0)],
          base_estimator,
          n_initial_points=2,
          acq_optimizer="sampling",
          random_state=1,
      )
  
      x0 = opt.ask()  # random point
      x1 = opt.ask()  # random point
      assert x0 != x1
      # first call to tell()
      r1 = opt.tell(x1, 3.0)
      assert len(r1.models) == 0
      x2 = opt.ask()  # random point
      assert x1 != x2
      # second call to tell()
      r2 = opt.tell(x2, 4.0)
      if base_estimator.lower() == "dummy":
          assert len(r2.models) == 0
      else:
          assert len(r2.models) == 1
      # this is the first non-random point
      x3 = opt.ask()
      assert x2 != x3
      x4 = opt.ask()
      r3 = opt.tell(x3, 1.0)
      # no new information was added so should be the same, unless we are using
      # the dummy estimator which will forever return random points and never
      # fits any models
      if base_estimator.lower() == "dummy":
          assert x3 != x4
          assert len(r3.models) == 0
      else:
          assert x3 == x4
          assert len(r3.models) == 2
  
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 15 for calling a global function with example usage: test_exhaust_initial_calls(base_estimator) without return types