code: def test_plot_grouping_evaluation():
      """Tests plot_grouping_evaluation function"""
      df = generate_df_for_tests(freq="D", periods=20)["df"]
      df.rename(
          columns={
              TIME_COL: "custom_time_column",
              VALUE_COL: "custom_value_column",
          },
          inplace=True,
      )
  
      ts = UnivariateTimeSeries()
      ts.load_data(
          df,
          time_col="custom_time_column",
          value_col="custom_value_column",
      )
  
      # groupby_time_feature
      fig = ts.plot_grouping_evaluation(
          aggregation_func=np.mean,
          aggregation_func_name="mean",
          groupby_time_feature="dow",
      )
  
      assert fig.data[0].name == f"mean of {VALUE_COL}"
      assert fig.layout.xaxis.title.text == "dow"
      assert fig.layout.yaxis.title.text == f"mean of {VALUE_COL}"
      assert fig.layout.title.text == f"mean of {VALUE_COL} vs dow"
      assert fig.data[0].x.shape[0] == 7
  
      # groupby_sliding_window_size
      fig = ts.plot_grouping_evaluation(
          aggregation_func=np.max,
          aggregation_func_name="max",
          groupby_sliding_window_size=7,
      )  # there are 20 training points, so this creates groups of size (6, 7, 7)
      assert fig.data[0].name == f"max of {VALUE_COL}"
      assert fig.layout.xaxis.title.text == f"{TIME_COL}_downsample"
      assert fig.layout.yaxis.title.text == f"max of {VALUE_COL}"
      assert (
          fig.layout.title.text
          == f"max of {VALUE_COL} vs {TIME_COL}_downsample"
      )
      assert fig.data[0].x.shape[0] == 3
  
      # groupby_custom_column
      custom_groups = pd.Series(
          ["g1", "g2", "g3", "g4", "g5"], name="custom_groups"
      ).repeat(4)
      fig = ts.plot_grouping_evaluation(
          aggregation_func=np.min,
          aggregation_func_name="min",
          groupby_custom_column=custom_groups,
      )
      assert fig.data[0].name == f"min of {VALUE_COL}"
      assert fig.layout.xaxis.title.text == "custom_groups"
      assert fig.layout.yaxis.title.text == f"min of {VALUE_COL}"
      assert (
          fig.layout.title.text
          == f"min of {VALUE_COL} vs custom_groups"
      )
      assert fig.data[0].x.shape[0] == 5
  
      # custom xlabel, ylabel and title
      fig = ts.plot_grouping_evaluation(
          aggregation_func=np.mean,
          aggregation_func_name="mean",
          groupby_time_feature="dow",
          xlabel="Day of Week",
          ylabel="Average of y",
          title="Average of y by Day of week",
      )
      assert fig.layout.xaxis.title.text == "Day of Week"
      assert fig.layout.yaxis.title.text == "Average of y"
      assert fig.layout.title.text == "Average of y by Day of week"
  
imports: import datetime
  from datetime import datetime
  import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal
  from greykite.common.constants import ADJUSTMENT_DELTA_COL
  from greykite.common.constants import END_TIME_COL
  from greykite.common.constants import METRIC_COL
  from greykite.common.constants import START_TIME_COL
  from greykite.common.constants import TIME_COL
  from greykite.common.constants import VALUE_COL
  from greykite.common.python_utils import assert_equal
  from greykite.common.testing_utils import generate_df_for_tests
  from greykite.common.testing_utils import generate_df_with_reg_for_tests
  from greykite.common.time_properties import get_canonical_data
  from greykite.common.viz.timeseries_plotting import add_groupby_column
  from greykite.framework.benchmark.data_loader_ts import DataLoaderTS
  from greykite.framework.constants import MEAN_COL_GROUP
  from greykite.framework.constants import OVERLAY_COL_GROUP
  from greykite.framework.constants import QUANTILE_COL_GROUP
  from greykite.framework.input.univariate_time_series import UnivariateTimeSeries
label_desc: Use image node_id 13 for calling a global function with example usage: test_plot_grouping_evaluation() without return types