code: def check_interval_df(interval_df, index_to_match):
      """Verify that a predicted interval DataFrame is formatted correctly.
  
      Parameters
      ----------
      interval_df : pandas DataFrame outputted from forecaster.predict_interval()
      index_to_match : Index object that must match interval_df.index
      """
      from sktime.datatypes import check_is_mtype
  
      checked = check_is_mtype(
          interval_df,
          "pred_interval",
          return_metadata=True,
          msg_return_dict="list",
      )
      if not checked[0]:
          raise ValueError(checked[1])
      df_idx = interval_df.index
      if (
          len(index_to_match) != len(df_idx)
          or not (index_to_match == df_idx).all()
      ):
          raise ValueError(
              "Prediction interval index must match the final Series index."
          )
      levels = interval_df.columns.levels
      if len(levels[0]) != 1:
          raise ValueError(
              "`interval_df` must only contain one variable with interval"
          )
  
file_path: sktime/sktime/utils/validation/forecasting.py
imports: from datetime import timedelta
  from typing import Optional, Union
  import numpy
  import pandas
  from sklearn.base import clone, is_regressor
  from sklearn.ensemble import GradientBoostingRegressor
  from sktime.utils.validation import array_is_datetime64, array_is_int, is_date_offset, is_int, is_timedelta
  from sktime.utils.validation.series import check_equal_time_index, check_series
label_desc: Use image node_id 12 for calling a global function with example usage: check_interval_df(interval_df, index_to_match) without return types