code: def _check_model_creation_and_indices(
      exp: TSForecastingExperiment,
      model: str,
      expected_return_index_type: Any,
  ):
      """Function to create a few trial models that support both univariate and
      multivariate forecasting.
  
      Parameters
      ----------
      exp : TSForecastingExperiment
          The Time Series experiment object
      model : str
          The model to create using the experiment provided
      expected_return_index_type: Any
          The expected return type of the index of the predictions dataframe
      """
      if model in exp.models().index:
          model = exp.create_model(model)
          preds = exp.predict_model(model)
          assert isinstance(preds.index, expected_return_index_type)
          exp.plot_model(model)
  
file_path: pycaret/tests/test_time_series_indices.py
imports: import os
  from typing import Any
  import pandas
  import pytest
  from pycaret.datasets import get_data
  from pycaret.time_series import TSForecastingExperiment
label_desc: Use image node_id 5 for calling a global function with example usage: _check_model_creation_and_indices(exp, model, expected_return_index_type) without return types