code: def uncertainty_evaluate(df_forecast: pd.DataFrame) -> pd.DataFrame:
      """Evaluate conformal prediction on test dataframe.
  
      Parameters
      ----------
          df_forecast : pd.DataFrame
              forecast dataframe with the conformal prediction intervals
  
      Returns
      -------
          pd.DataFrame
              table containing evaluation metrics such as interval_width and miscoverage_rate
      """
      # Remove beginning rows used as lagged regressors (if any), or future dataframes without y-values
      # therefore, this ensures that all forecast rows for evaluation contains both y and y-hat
      df_forecast_eval = df_forecast.dropna(
          subset=["y", "yhat1"]
      ).reset_index(drop=True)
  
      # Get evaluation params
      df_eval = pd.DataFrame()
      cols = df_forecast_eval.columns
      yhat_cols = [col for col in cols if "%" in col]
      n_forecasts = int(re.search("yhat(\\d+)", yhat_cols[-1]).group(1))
  
      # get the highest and lowest quantile percentages
      quantiles = []
      for col in yhat_cols:
          match = re.search(r"\d+\.\d+", col)
          if match:
              quantiles.append(float(match.group()))
      quantiles = sorted(set(quantiles))
  
      # Begin conformal evaluation steps
      for step_number in range(1, n_forecasts + 1):
          y = df_forecast_eval["y"].values
          # only relevant if show_all_PI is true
          if len([col for col in cols if "qhat" in col]) > 0:
              qhat_cols = [
                  col for col in cols if f"qhat{step_number}" in col
              ]
              yhat_lo = df_forecast_eval[qhat_cols[0]].values
              yhat_hi = df_forecast_eval[qhat_cols[-1]].values
          else:
              yhat_lo = df_forecast_eval[
                  f"yhat{step_number} {quantiles[0]}%"
              ].values
              yhat_hi = df_forecast_eval[
                  f"yhat{step_number} {quantiles[-1]}%"
              ].values
          (
              interval_width,
              miscoverage_rate,
          ) = _get_evaluate_metrics_from_dataset(y, yhat_lo, yhat_hi)
  
          # Construct row dataframe with current timestep using its q-hat, interval width, and miscoverage rate
          col_names = ["interval_width", "miscoverage_rate"]
          row = [interval_width, miscoverage_rate]
          df_row = pd.DataFrame(
              [row],
              columns=pd.MultiIndex.from_product(
                  [[f"yhat{step_number}"], col_names]
              ),
          )
  
          # Add row dataframe to overall evaluation dataframe with all forecasted timesteps
          df_eval = pd.concat([df_eval, df_row], axis=1)
  
      return df_eval
  
file_path: neural_prophet/neuralprophet/uncertainty.py
imports: import re
  from dataclasses import dataclass
  from typing import Any, List, Tuple, Union
  import matplotlib
  import numpy
  import pandas
  from neuralprophet.plot_forecast_matplotlib import plot_interval_width_per_timestep, plot_nonconformity_scores
  from neuralprophet.plot_forecast_plotly import plot_interval_width_per_timestep
  from neuralprophet.plot_forecast_plotly import plot_nonconformity_scores
  from neuralprophet.plot_utils import log_warning_deprecation_plotly, select_plotting_backend
label_desc: Use image node_id 1 for calling a global function with example usage: uncertainty_evaluate(df_forecast) and returns: df_eval