code: def test_early_stop_5():
      def objective_function(para):
          return para["x1"]
  
      search_space = {
          "x1": list(np.arange(0, 100, 0.01)),
      }
  
      n_iter_no_change = 5
      early_stopping = {
          "n_iter_no_change": n_iter_no_change,
          "tol_abs": 0.1,
          "tol_rel": None,
      }
  
      start1 = {"x1": 0}
      start2 = {"x1": 0.09}
      start3 = {"x1": 0.20}
  
      warm_start_l = [
          start1,
          start1,
          start1,
          start1,
          start1,
          start2,
          start2,
          start2,
          start3,
          start3,
          start3,
      ]
      n_iter = len(warm_start_l)
  
      hyper = Hyperactive()
      hyper.add_search(
          objective_function,
          search_space,
          n_iter=n_iter,
          initialize={"warm_start": warm_start_l},
          early_stopping=early_stopping,
      )
      hyper.run()
  
      search_data = hyper.search_data(objective_function)
      n_performed_iter = len(search_data)
  
      print("\n n_performed_iter \n", n_performed_iter)
      print("\n n_iter_no_change \n", n_iter_no_change)
  
      assert n_performed_iter == (n_iter_no_change + 1)
  
file_path: Hyperactive/tests/test_early_stop.py
imports: import time
  import pytest
  import numpy
  from sklearn.datasets import load_breast_cancer
  from sklearn.model_selection import cross_val_score
  from sklearn.tree import DecisionTreeClassifier
  from hyperactive import Hyperactive
  from hyperactive.optimizers import RandomSearchOptimizer, HillClimbingOptimizer
label_desc: Use image node_id 7 for calling a global function with example usage: test_early_stop_5() and returns: para