code: def test_strategy_combinations_2(Optimizer, Optimizer_strat):
      optimizer1 = Optimizer()
      optimizer2 = Optimizer_strat()
  
      opt_strat = CustomOptimizationStrategy()
      opt_strat.add_optimizer(optimizer1, duration=0.9)
      opt_strat.add_optimizer(optimizer2, duration=0.1)
  
      n_iter = 10
  
      hyper = Hyperactive()
      hyper.add_search(
          objective_function,
          search_space,
          optimizer=opt_strat,
          n_iter=n_iter,
          memory=False,
      )
      hyper.run()
  
      search_data = hyper.search_data(objective_function)
  
      optimizer1 = hyper.opt_pros[0].optimizer_setup_l[0]["optimizer"]
      optimizer2 = hyper.opt_pros[0].optimizer_setup_l[1]["optimizer"]
  
      assert len(search_data) == n_iter
  
      assert len(optimizer1.search_data) == 9
      assert len(optimizer2.search_data) == 1
  
      assert optimizer1.best_score <= optimizer2.best_score
  
file_path: Hyperactive/tests/_local_test_optimization_strategies/_test_strategy_combinations.py
imports: import pytest
  import numpy
  from hyperactive import Hyperactive
  from hyperactive.optimizers.strategies import CustomOptimizationStrategy
  from ._parametrize import optimizers, optimizers_strat
label_desc: Use image node_id 4 for calling a global function with example usage: test_strategy_combinations_2(Optimizer, Optimizer_strat) without return types