code: def test_chooser_next(make_scenario):
      configspace = _test_helpers.get_branin_config_space()
      scenario = make_scenario(
          configspace=configspace,
      )
      config = scenario.configspace.sample_configuration()
      rh = RunHistory()
      rh.add(config, 10, 10, StatusType.SUCCESS)
      tae = lambda x: x
      facade = BOinGFacade(
          scenario=scenario,
          runhistory=rh,
          target_function=tae,
          do_switching=False,
          overwrite=True,
      )
      optimizer = facade.optimizer
  
      x = next(optimizer.ask())
      # when number of points is not large enough for building a subspace, GP works locally
      assert x.origin == "Local Search"
      for i in range(15):
          config = scenario.configspace.sample_configuration()
          rh.add(config, 10, 10, StatusType.SUCCESS)
  
      x = next(optimizer.ask())
      # when number of points is already large enough for building a subspace, BOinG takes over
      assert x.origin == "BOinG"
  
      facade.do_switching = True
      facade._init_optimizer()
      optimizer = facade.optimizer
      optimizer.run_TuRBO = True
      x = next(optimizer.ask())
      assert x.origin == "TuRBO"
  
file_path: SMAC3/tests/test_main/_test_boing.py
imports: from unittest.mock import patch
  import numpy
  import pytest
  from ConfigSpace import CategoricalHyperparameter, ConfigurationSpace, UniformFloatHyperparameter
  import smac
  from smac.facade.blackbox_facade import BlackBoxFacade
  from smac.facade.hyperparameter_optimization_facade import HyperparameterOptimizationFacade
  from smac.facade.old.boing_facade import BOinGFacade
  from smac.main.boing import subspace_extraction
  from smac.model.random_forest.random_forest import RandomForest
  from smac.model.utils import check_subspace_points, get_types
  from smac.runhistory.runhistory import RunHistory
  from smac.runner.abstract_runner import StatusType
  from smac.utils import _test_helpers
label_desc: Use image node_id 2 for calling a global function with example usage: test_chooser_next(make_scenario) without return types