code: def test_plot_final_model_exo():
      """Tests running plot model after running finalize_model when exogenous
      variables are present. Fix for https://github.com/pycaret/pycaret/issues/3565
      """
      data = get_data("uschange")
      target = "Consumption"
      FH = 3
      train = data.iloc[: int(len(data) - FH)]
      test = data.iloc[int(len(data)) - FH :]
      test = test.drop(columns=[target], axis=1)
  
      exp = TSForecastingExperiment()
      exp.setup(data=train, target=target, fh=FH, session_id=42)
      model = exp.create_model("arima")
      final_model = exp.finalize_model(model)
  
      # Previous issue coming from renderer resolution due to X
  
      # This should not give an error (passing X explicitly)
      exp.plot_model(final_model, data_kwargs={"X": test})
  
      # Also, plotting without explicit passing X should also pass
      exp.plot_model()
  
file_path: pycaret/tests/test_time_series_plots.py
imports: import os
  import sys
  import numpy
  import pytest
  from time_series_test_utils import _ALL_PLOTS_DATA, _ALL_PLOTS_ESTIMATOR, _ALL_PLOTS_ESTIMATOR_NOT_DATA, _return_all_plots_estimator_ts_results, _return_data_with_without_period_index, _return_model_names_for_plots_stats
  from pycaret.datasets import get_data
  from pycaret.time_series import TSForecastingExperiment
label_desc: Use image node_id 8 for calling a global function with example usage: test_plot_final_model_exo() without return types