code: def test_extract_forecasts(valid_bm, df, valid_configs, custom_tscv):
      bm = valid_bm
      bm.extract_forecasts()
  
      for config_name, config in bm.result.items():
          rolling_forecast_df = config["rolling_forecast_df"]
          # Addition of train_end_date, forecast_step & step_num results in 8 columns
          assert rolling_forecast_df.shape == (
              custom_tscv.forecast_horizon * custom_tscv.max_splits,
              8,
          )
          # Checks train_end_dates column
          train_end_date_values = rolling_forecast_df[
              "train_end_date"
          ].values
          expected_train_end_date_values = np.repeat(
              [
                  np.datetime64("2018-10-06"),
                  np.datetime64("2018-10-13"),
                  np.datetime64("2018-10-20"),
              ],
              custom_tscv.forecast_horizon,
          )
          np.testing.assert_array_equal(
              train_end_date_values, expected_train_end_date_values
          )
          # Checks forecast_step column
          assert_equal(
              rolling_forecast_df[FORECAST_STEP_COL].values,
              np.tile(
                  np.arange(custom_tscv.forecast_horizon) + 1,
                  custom_tscv.max_splits,
              ),
          )
  
          expected_columns = {
              "train_end_date",
              FORECAST_STEP_COL,
              "split_num",
              TIME_COL,
              ACTUAL_COL,
              PREDICTED_COL,
              PREDICTED_LOWER_COL,
              PREDICTED_UPPER_COL,
          }
          assert expected_columns == set(rolling_forecast_df.columns)
  
      expected_columns = {
          "train_end_date",
          FORECAST_STEP_COL,
          "split_num",
          TIME_COL,
          ACTUAL_COL,
          f"valid_prophet_{PREDICTED_COL}",
          f"valid_prophet_{PREDICTED_LOWER_COL}",
          f"valid_prophet_{PREDICTED_UPPER_COL}",
          f"valid_silverkite_{PREDICTED_COL}",
          f"valid_silverkite_{PREDICTED_LOWER_COL}",
          f"valid_silverkite_{PREDICTED_UPPER_COL}",
      }
      assert set(bm.forecasts.columns) == expected_columns
  
      # error when `run` method has not been executed yet
      with pytest.raises(
          ValueError,
          match="Please execute 'run' method to create forecasts.",
      ):
          bm = BenchmarkForecastConfig(
              df=df, configs=valid_configs, tscv=custom_tscv
          )
          bm.extract_forecasts()
  
imports: import pickle
  import sys
  import numpy
  import pandas
  import pytest
  from plotly.colors import DEFAULT_PLOTLY_COLORS
  from greykite.algo.forecast.silverkite.constants.silverkite_holiday import SilverkiteHoliday
  from greykite.common.constants import ACTUAL_COL
  from greykite.common.constants import PREDICTED_COL
  from greykite.common.constants import PREDICTED_LOWER_COL
  from greykite.common.constants import PREDICTED_UPPER_COL
  from greykite.common.constants import TIME_COL
  from greykite.common.constants import VALUE_COL
  from greykite.common.evaluation import EvaluationMetricEnum
  from greykite.common.evaluation import root_mean_squared_error
  from greykite.common.python_utils import assert_equal
  from greykite.common.testing_utils import generate_df_with_reg_for_tests
  from greykite.framework.benchmark.benchmark_class import BenchmarkForecastConfig
  from greykite.framework.constants import FORECAST_STEP_COL
  from greykite.framework.templates.autogen.forecast_config import ComputationParam
  from greykite.framework.templates.autogen.forecast_config import EvaluationMetricParam
  from greykite.framework.templates.autogen.forecast_config import EvaluationPeriodParam
  from greykite.framework.templates.autogen.forecast_config import ForecastConfig
  from greykite.framework.templates.autogen.forecast_config import MetadataParam
  from greykite.framework.templates.autogen.forecast_config import ModelComponentsParam
  from greykite.framework.templates.forecaster import Forecaster
  from greykite.framework.templates.model_templates import ModelTemplateEnum
  from greykite.sklearn.cross_validation import RollingTimeSeriesSplit
label_desc: Use image node_id 9 for calling a global function with example usage: test_extract_forecasts(valid_bm, df, valid_configs, custom_tscv) without return types