code: def _get_plot(
      plot: str,
      fig_defaults: Dict[str, Any],
      data: Optional[pd.DataFrame] = None,
      data_label: Optional[str] = None,
      X: Optional[List[pd.DataFrame]] = None,
      X_labels: Optional[List[str]] = None,
      cv: Optional[
          Union[ExpandingWindowSplitter, SlidingWindowSplitter]
      ] = None,
      model_results: Optional[List[pd.DataFrame]] = None,
      model_labels: Optional[List[str]] = None,
      return_pred_int: bool = False,
      data_kwargs: Optional[Dict] = None,
      fig_kwargs: Optional[Dict] = None,
  ) -> PlotReturnType:
      """TODO: Fill
      data = DataFrame for Target Variable (each column can represent one version
      of the target series, e.g. Original, Transformed, Imputed)
      data_label = Name of the target series
      """
      data_kwargs = data_kwargs or {}
      fig_kwargs = fig_kwargs or {}
  
      big_data_threshold = _resolve_dict_keys(
          dict_=fig_kwargs,
          key="big_data_threshold",
          defaults=fig_defaults,
      )
      hoverinfo = _resolve_dict_keys(
          dict_=fig_kwargs, key="hoverinfo", defaults=fig_defaults
      )
      hoverinfo = _resolve_hoverinfo(
          hoverinfo=hoverinfo,
          threshold=big_data_threshold,
          data=data,
          X=X,
      )
  
      if plot in ["ts", "train_test_split"]:
          fig, plot_data = plot_series(
              y=data,
              y_label=data_label,
              fig_defaults=fig_defaults,
              X=X,
              X_labels=X_labels,
              hoverinfo=hoverinfo,
              fig_kwargs=fig_kwargs,
          )
      elif plot == "cv":
          fig, plot_data = plot_cv(
              data=data,
              cv=cv,
              fig_defaults=fig_defaults,
              fig_kwargs=fig_kwargs,
          )
  
      elif plot in ["decomp", "decomp_stl"]:
          fig, plot_data = plot_time_series_decomposition(
              data=data,
              plot=plot,
              fig_defaults=fig_defaults,
              data_kwargs=data_kwargs,
              data_label=data_label,
              model_labels=model_labels,
              fig_kwargs=fig_kwargs,
          )
      elif plot in ["acf", "pacf"]:
          fig, plot_data = plot_xacf(
              data=data,
              plot=plot,
              fig_defaults=fig_defaults,
              data_label=data_label,
              model_labels=model_labels,
              data_kwargs=data_kwargs,
              fig_kwargs=fig_kwargs,
          )
      elif plot in ["periodogram", "fft"]:
          fig, plot_data = plot_frequency_components(
              data=data,
              plot=plot,
              fig_defaults=fig_defaults,
              data_label=data_label,
              model_labels=model_labels,
              hoverinfo=hoverinfo,
              fig_kwargs=fig_kwargs,
          )
      elif plot == "diagnostics":
          fig, plot_data = plot_diagnostics(
              data=data,
              fig_defaults=fig_defaults,
              data_label=data_label,
              model_labels=model_labels,
              hoverinfo=hoverinfo,
              fig_kwargs=fig_kwargs,
          )
      elif plot == "diff":
          fig, plot_data = plot_time_series_differences(
              data=data,
              fig_defaults=fig_defaults,
              data_label=data_label,
              model_labels=model_labels,
              hoverinfo=hoverinfo,
              data_kwargs=data_kwargs,
              fig_kwargs=fig_kwargs,
          )
      elif plot in ["forecast", "insample", "residuals"]:
          if return_pred_int:
              fig, plot_data = plot_predictions_with_confidence(
                  data=data,
                  predictions=model_results,
                  fig_defaults=fig_defaults,
                  model_labels=model_labels,
                  data_kwargs=data_kwargs,
                  fig_kwargs=fig_kwargs,
              )
          else:
              fig, plot_data = plot_model_results(
                  original_data=data,
                  model_results=model_results,
                  model_labels=model_labels,
                  plot=plot,
                  fig_defaults=fig_defaults,
                  hoverinfo=hoverinfo,
                  fig_kwargs=fig_kwargs,
              )
      elif plot == "ccf":
          fig, plot_data = plot_ccf(
              y=data,
              y_label=data_label,
              X=X,
              X_labels=X_labels,
              fig_defaults=fig_defaults,
              fig_kwargs=fig_kwargs,
          )
      else:
          raise ValueError(f"Plot: '{plot}' is not supported.")
  
      return fig, plot_data
  
file_path: pycaret/pycaret/internal/plots/time_series.py
imports: from typing import Any, Dict, List, Optional, Union
  import numpy
  import pandas
  import plotly.graph_objects
  from plotly.subplots import make_subplots
  from sktime.forecasting.model_selection import ExpandingWindowSplitter, SlidingWindowSplitter
  from pycaret.internal.plots.utils.time_series import PlotReturnType, _clean_model_results_labels, _get_subplot_rows_cols, _plot_fig_update, _resolve_hoverinfo, _update_fig_dimensions, corr_subplot, decomp_subplot, dist_subplot, frequency_components_subplot, plot_original_with_overlays, qq_subplot, time_series_subplot
  from pycaret.utils.generic import _resolve_dict_keys
  from pycaret.utils.time_series import get_diffs
label_desc: Use image node_id 1 for calling a global function with example usage: _get_plot(plot, fig_defaults, data, data_label, X, X_labels, cv, model_results, model_labels, return_pred_int, data_kwargs, fig_kwargs) and returns: fig,  plot_data