code: def test_add_agg_freq_cols(params, hourly_data_with_reg):
      model = MultistageForecastEstimator(**params)
      model.time_col_ = cst.TIME_COL
      model.value_col_ = cst.VALUE_COL
      model._initialize()
      df = model._add_agg_freq_cols(df=hourly_data_with_reg)
      assert (
          df.shape[1] == 5
      )  # includes the original 3 and 2 extra columns from the two aggregations.
      assert list(df.columns) == [
          cst.TIME_COL,
          cst.VALUE_COL,
          "regressor",
          f"{cst.TIME_COL}__0__D",
          f"{cst.TIME_COL}__1__H",
      ]
      assert (
          df[f"{cst.TIME_COL}__0__D"].unique().shape[0] == 7 * 8
      )  # data has 7 weeks.
      assert (
          df[f"{cst.TIME_COL}__1__H"].unique().shape[0] == df.shape[0]
      )  # hourly is the original freq.
  
      # Tests error.
      with pytest.raises(
          ValueError, match="The df size is zero. Does your"
      ):
          model._add_agg_freq_cols(df.iloc[:0])
  
imports: import datetime
  import numpy
  import pandas
  import pytest
  from testfixtures import LogCapture
  import greykite.common.constants
  from greykite.common.testing_utils import generate_df_for_tests
  from greykite.sklearn.estimator.lag_based_estimator import LagBasedEstimator
  from greykite.sklearn.estimator.multistage_forecast_estimator import MultistageForecastEstimator
  from greykite.sklearn.estimator.multistage_forecast_estimator import MultistageForecastModelConfig
  from greykite.sklearn.estimator.simple_silverkite_estimator import SimpleSilverkiteEstimator
  from greykite.sklearn.uncertainty.uncertainty_methods import UncertaintyMethodEnum
label_desc: Use image node_id 13 for calling a global function with example usage: test_add_agg_freq_cols(params, hourly_data_with_reg) without return types