code: def test_get_grouping_evaluation():
      """Tests get_grouping_evaluation function"""
      df = pd.DataFrame(
          {
              "custom_time_column": [
                  datetime.datetime(2018, 1, 1),
                  datetime.datetime(2018, 1, 2),
                  datetime.datetime(2018, 1, 3),
                  datetime.datetime(2018, 1, 4),
                  datetime.datetime(2018, 1, 5),
              ],
              "custom_value_column": [1.0, 2.0, 3.0, 4.0, 5.0],
          }
      )
  
      ts = UnivariateTimeSeries()
      ts.load_data(
          df,
          time_col="custom_time_column",
          value_col="custom_value_column",
      )
  
      # mean, groupby_time_feature
      grouped_df = ts.get_grouping_evaluation(
          aggregation_func=np.mean,
          aggregation_func_name="mean",
          groupby_time_feature="dow",
      )
      expected = pd.DataFrame(
          {
              "dow": [
                  1,
                  2,
                  3,
                  4,
                  5,
              ],  # Monday, Tuesday, etc. Time feature is used as column name
              f"mean of {VALUE_COL}": [1.0, 2.0, 3.0, 4.0, 5.0],
          }
      )
      assert_equal(grouped_df, expected)
  
      # max, groupby_sliding_window_size
      grouped_df = ts.get_grouping_evaluation(
          aggregation_func=np.max,
          aggregation_func_name="max",
          groupby_sliding_window_size=2,
      )
      expected = pd.DataFrame(
          {
              f"{TIME_COL}_downsample": [
                  datetime.datetime(2018, 1, 1),
                  datetime.datetime(2018, 1, 3),
                  datetime.datetime(2018, 1, 5),
              ],
              f"max of {VALUE_COL}": [1.0, 3.0, 5.0],
          }
      )
      assert_equal(grouped_df, expected)
  
      # min, groupby_custom_column
      grouped_df = ts.get_grouping_evaluation(
          aggregation_func=np.min,
          aggregation_func_name=None,
          groupby_custom_column=pd.Series(
              ["g1", "g2", "g1", "g3", "g2"], name="custom_groups"
          ),
      )
      expected = pd.DataFrame(
          {
              "custom_groups": ["g1", "g2", "g3"],
              f"aggregation of {VALUE_COL}": [1.0, 2.0, 4.0],
          }
      )
      assert_equal(grouped_df, expected)
  
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 12 for calling a global function with example usage: test_get_grouping_evaluation() without return types