code: def test_same_agg_freq(
      daily_data, config_silverkite_daily, config_silverkite_daily_2
  ):
      """Tests two stages with the same aggregation frequency.
      Data is daily, and both stages uses daily aggregation.
      """
      df = daily_data["train_df"]
      df_test = daily_data["test_df"]
      forecast_horizon = len(df_test)
      config_silverkite_daily.estimator_params[
          "forecast_horizon"
      ] = forecast_horizon
      config_silverkite_daily_2.estimator_params[
          "forecast_horizon"
      ] = forecast_horizon
      params = dict(
          forecast_horizon=forecast_horizon,
          freq="D",
          model_configs=[
              config_silverkite_daily,
              config_silverkite_daily_2,
          ],
      )
      model = MultistageForecastEstimator(**params)
      # Tests fit
      model.fit(df)
      # Checks models
      # Intercept, ct1, 6 weekly seas terms, 10 quarterly seas terms
      assert model.models[0].model_dict["x_mat"].shape[1] == 18
      # Intercept, 6 ar terms
      assert model.models[1].model_dict["x_mat"].shape[1] == 7
  
      # Tests prediction
      df_fit = model.predict(df)
      assert df_fit[cst.PREDICTED_COL].isna().sum() == 0
      df_predict = model.predict(df_test)
      assert df_predict[cst.PREDICTED_COL].isna().sum() == 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 27 for calling a global function with example usage: test_same_agg_freq(daily_data, config_silverkite_daily, config_silverkite_daily_2) without return types