code: def test_get_evaluation_metrics(
      valid_bm, metric_dict, df, valid_configs, custom_tscv
  ):
      bm = valid_bm
  
      # default value, all configs
      with pytest.warns(UserWarning):
          evaluation_metrics_df = bm.get_evaluation_metrics(
              metric_dict=metric_dict
          )
  
          expected_columns = {"config_name", "split_num"}
          for metric_name in metric_dict.keys():
              expected_columns = expected_columns.union(
                  {f"train_{metric_name}", f"test_{metric_name}"}
              )
          assert set(evaluation_metrics_df.columns) == expected_columns
          expected_row_num = len(bm.configs) * bm.tscv.max_splits
          assert evaluation_metrics_df.shape[0] == expected_row_num
          # check metric values
          assert_equal(
              evaluation_metrics_df["train_MSE"].values,
              evaluation_metrics_df["train_custom_MSE"].values,
          )
          assert_equal(
              evaluation_metrics_df["test_MSE"].values,
              evaluation_metrics_df["test_custom_MSE"].values,
          )
          assert (
              evaluation_metrics_df["train_corr"]
              .dropna()
              .between(-1, 1)
              .all()
          )
          assert (
              evaluation_metrics_df["test_corr"]
              .dropna()
              .between(-1, 1)
              .all()
          )
  
      # custom config value
      with pytest.warns(UserWarning):
          config_names = ["valid_silverkite"]
          evaluation_metrics_df = bm.get_evaluation_metrics(
              metric_dict=metric_dict, config_names=config_names
          )
          # columns remain the same
          expected_columns = {"config_name", "split_num"}
          for metric_name in metric_dict.keys():
              expected_columns = expected_columns.union(
                  {f"train_{metric_name}", f"test_{metric_name}"}
              )
          assert set(evaluation_metrics_df.columns) == expected_columns
          # number of rows change
          expected_row_num = len(config_names) * bm.tscv.max_splits
          assert evaluation_metrics_df.shape[0] == expected_row_num
  
      # error when `run` method has not been executed yet
      with pytest.raises(
          ValueError,
          match="Please execute the 'run' method "
          "before computing evaluation metrics.",
      ):
          bm = BenchmarkForecastConfig(
              df=df, configs=valid_configs, tscv=custom_tscv
          )
          bm.get_evaluation_metrics(metric_dict=metric_dict)
  
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 12 for calling a global function with example usage: test_get_evaluation_metrics(valid_bm, metric_dict, df, valid_configs, custom_tscv) without return types