code: def test_create_tune_predict_finalize_model(load_uni_exo_data_target):
      """test create_model, tune_model, predict_model and finalize_model
      functionality using exogenous variables
      """
      data, target = load_uni_exo_data_target
  
      fh = 12
      data_for_modeling = data.iloc[:-12]
      future_data = data.iloc[-12:]
      future_exog = future_data.drop(columns=target)
  
      exp = TSForecastingExperiment()
      exp.setup(
          data=data_for_modeling, target=target, fh=fh, session_id=42
      )
  
      #######################
      # Test Create Model ##
      #######################
      model = exp.create_model("arima")
  
      #########################
      # Expected Values ####
      #########################
      expected_period_index = data_for_modeling.iloc[-fh:].index
      final_expected_period_index = future_exog.index
  
      ########################
      # Test Predict Model ##
      ########################
      # Default prediction
      y_pred = exp.predict_model(model)
      assert isinstance(y_pred, pd.DataFrame)
      assert np.all(y_pred.index == expected_period_index)
  
      #####################
      # Test Tune Model ##
      #####################
      tuned_model = exp.tune_model(model)
  
      ########################
      # Test Predict Model ##
      ########################
      # Default prediction
      y_pred = exp.predict_model(tuned_model)
      assert isinstance(y_pred, pd.DataFrame)
      assert np.all(y_pred.index == expected_period_index)
  
      #########################
      # Test Finalize Model ##
      #########################
  
      final_model = exp.finalize_model(tuned_model)
      y_pred = exp.predict_model(final_model, X=future_exog)
  
      assert np.all(y_pred.index == final_expected_period_index)
  
file_path: pycaret/tests/test_time_series_exogenous.py
imports: import numpy
  import pandas
  import pytest
  from pycaret.time_series import TSForecastingExperiment
  from pycaret.utils.time_series import TSApproachTypes, TSExogenousPresent
label_desc: Use image node_id 1 for calling a global function with example usage: test_create_tune_predict_finalize_model(load_uni_exo_data_target) without return types