code: def test_tune_model_raises(load_pos_and_neg_data):
      """Tests conditions that raise an error due to lack of data"""
  
      exp = TSForecastingExperiment()
  
      fh = np.arange(1, 13)
      fold = 2
      data = load_pos_and_neg_data
  
      exp.setup(
          data=data,
          fh=fh,
          fold=fold,
          fold_strategy="expanding",
          verbose=False,
          session_id=42,
      )
  
      model = exp.create_model("naive")
      with pytest.raises(
          ValueError, match=".*`search_algorithm` must be one of.*"
      ):
          search_algorithm = "wrong_algorithm"
          exp.tune_model(model, search_algorithm=search_algorithm)
  
file_path: pycaret/tests/test_time_series_tune_base.py
imports: import numpy
  import pandas
  import pytest
  from sktime.forecasting.compose import ForecastingPipeline
  from time_series_test_utils import _ALL_METRICS
  from pycaret.time_series import TSForecastingExperiment
label_desc: Use image node_id 4 for calling a global function with example usage: test_tune_model_raises(load_pos_and_neg_data) without return types