code: def test_plot_grouping_evaluation(valid_bm, metric_dict):
      bm = valid_bm
  
      # default value, all configs, groupby time feature
      fig = bm.plot_grouping_evaluation_metrics(
          metric_dict=metric_dict, groupby_time_feature="woy"
      )
      assert fig.layout.showlegend
      assert fig.layout.xaxis.title.text == "woy"
      assert fig.layout.yaxis.title.text == "Metric value"
      assert (
          fig.layout.title.text
          == "train performance by woy across rolling windows"
      )
      assert fig.layout.title.x == 0.5
      assert len(fig.data) == len(bm.configs) * len(metric_dict)
  
      assert fig.data[0].name == "train MSE_valid_prophet"
      assert fig.data[1].name == "train MSE_valid_silverkite"
      assert fig.data[2].name == "train RMSE_valid_prophet"
      assert fig.data[3].name == "train RMSE_valid_silverkite"
  
      # groupby sliding window size
      config_names = ["valid_prophet"]
      fig = bm.plot_grouping_evaluation_metrics(
          metric_dict=metric_dict,
          config_names=config_names,
          which="test",
          groupby_sliding_window_size=4,
          xlabel="xlab",
          ylabel="ylab",
          title="title",
          showlegend=False,
      )
      assert not fig.layout.showlegend
      assert fig.layout.xaxis.title.text == "xlab"
      assert fig.layout.yaxis.title.text == "ylab"
      assert fig.layout.title.text == "title"
      assert fig.layout.title.x == 0.5
      assert len(fig.data) == len(config_names) * len(metric_dict)
  
      assert fig.data[0].name == "test MSE_valid_prophet"
      assert fig.data[1].name == "test RMSE_valid_prophet"
      assert fig.data[2].name == "test corr_valid_prophet"
      assert fig.data[3].name == "test custom_MSE_valid_prophet"
      assert fig.data[4].name == "test q95_loss_valid_prophet"
  
      # groupby custom column
      custom_column = pd.Series(
          np.repeat(["g1", "g2"], 7), name="group"
      )
      fig = bm.plot_grouping_evaluation_metrics(
          metric_dict=metric_dict,
          which="test",
          groupby_custom_column=custom_column,
          title="Error by custom group",
      )
      assert fig.layout.showlegend
      assert fig.layout.xaxis.title.text == custom_column.name
      assert fig.layout.yaxis.title.text == "Metric value"
      assert fig.layout.title.text == "Error by custom group"
      assert fig.layout.title.x == 0.5
      assert len(fig.data) == len(bm.configs) * len(metric_dict)
  
      assert fig.data[0].name == "test MSE_valid_prophet"
      assert fig.data[1].name == "test MSE_valid_silverkite"
      assert fig.data[2].name == "test RMSE_valid_prophet"
      assert fig.data[3].name == "test RMSE_valid_silverkite"
  
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 15 for calling a global function with example usage: test_plot_grouping_evaluation(valid_bm, metric_dict) without return types