code: def plot_bt_predictions(
      bt_pred_df,
      metrics=smape,
      split_key_list=None,
      ncol=2,
      figsize=None,
      include_vline=True,
      title="",
      fontsize=20,
      path=None,
      is_visible=True,
  ):
      """function to plot and visualize the prediction results from back testing.
  
      bt_pred_df : data frame
          the output of `orbit.diagnostics.backtest.BackTester.fit_predict()`, which includes the actuals/predictions
          for all the splits
      metrics : callable
          the metric function
      split_key_list: list; default None
          with given model, which split keys to plot. If None, all the splits will be plotted
      ncol : int
          number of columns of the panel; number of rows will be decided accordingly
      figsize : tuple
          figure size
      include_vline : bool
          if plotting the vertical line to cut the in-sample and out-of-sample predictions for each split
      title : str
          title of the plot
      fontsize: int; optional
          fontsize of the title
      path : string
          path to save the figure
      is_visible : bool
          if displaying the figure
      """
      if figsize is None:
          figsize = (16, 8)
  
      metric_vals = bt_pred_df.groupby(
          BacktestFitKeys.SPLIT_KEY.value
      ).apply(
          lambda x: metrics(
              x[~x[BacktestFitKeys.TRAIN_FLAG.value]][
                  BacktestFitKeys.ACTUAL.value
              ],
              x[~x[BacktestFitKeys.TRAIN_FLAG.value]][
                  BacktestFitKeys.PREDICTED.value
              ],
          )
      )
  
      if split_key_list is None:
          split_key_list_ = bt_pred_df[
              BacktestFitKeys.SPLIT_KEY.value
          ].unique()
      else:
          split_key_list_ = split_key_list
  
      num_splits = len(split_key_list_)
      nrow = math.ceil(num_splits / ncol)
      fig, axes = plt.subplots(
          nrow,
          ncol,
          figsize=figsize,
          squeeze=False,
          facecolor="w",
          constrained_layout=False,
      )
  
      for idx, split_key in enumerate(split_key_list_):
          row_idx = idx // ncol
          col_idx = idx % ncol
          tmp = bt_pred_df[
              bt_pred_df[BacktestFitKeys.SPLIT_KEY.value] == split_key
          ].copy()
          axes[row_idx, col_idx].plot(
              tmp[BacktestFitKeys.DATE.value],
              tmp[BacktestFitKeys.PREDICTED.value],
              # linewidth=2,
              color=PredPal.PREDICTION_LINE.value,
          )
          axes[row_idx, col_idx].scatter(
              tmp[BacktestFitKeys.DATE.value],
              tmp[BacktestFitKeys.ACTUAL.value],
              label=BacktestFitKeys.ACTUAL.value,
              color=PredPal.ACTUAL_OBS.value,
              alpha=0.6,
              s=8,
          )
          # axes[row_idx, col_idx].grid(True, which='major', c='gray', ls='-', lw=1, alpha=0.4)
  
          axes[row_idx, col_idx].set_title(
              label="split {}; {} {:.3f}".format(
                  split_key, metrics.__name__, metric_vals[split_key]
              )
          )
          if include_vline:
              cutoff_date = tmp[~tmp[BacktestFitKeys.TRAIN_FLAG.value]][
                  BacktestFitKeys.DATE.value
              ].min()
              axes[row_idx, col_idx].axvline(
                  x=cutoff_date,
                  linestyle="--",
                  color=PredPal.HOLDOUT_VERTICAL_LINE.value,
                  # linewidth=4,
                  alpha=0.8,
              )
  
      plt.suptitle(title, fontsize=fontsize)
      fig.tight_layout()
      if path:
          fig.savefig(path)
      if is_visible:
          plt.show()
      else:
          plt.close()
  
      return axes
  
imports: import matplotlib.pyplot
  import seaborn
  import pandas
  import numpy
  import math
  import os
  import pkg_resources
  import statsmodels.api
  from scipy import stats
  from ..constants.constants import PredictionKeys
  from orbit.utils.general import is_empty_dataframe, is_ordered_datetime
  from ..constants.constants import BacktestFitKeys
  from ..constants.palette import PredictionPaletteClassic
  from orbit.constants import palette
  from orbit.diagnostics.metrics import smape
  from orbit.utils.plot import orbit_style_decorator
  from ..exceptions import PlotException
  import logging
label_desc: Use image node_id 3 for calling a global function with example usage: plot_bt_predictions(bt_pred_df, metrics, split_key_list, ncol, figsize, include_vline, title, fontsize, path, is_visible) and returns: axes