code: def test_lagged_regressors(daily_data_with_reg, params):
      """Tests a basic model with lagged regressors"""
      train_df = daily_data_with_reg["train_df"]
      test_df = daily_data_with_reg["test_df"][:20]
  
      # default forecast horizon, no uncertainty
      model = SilverkiteEstimator(
          lagged_regressor_dict=params["lagged_regressor_dict"]
      )
      model.fit(
          train_df, time_col=cst.TIME_COL, value_col=cst.VALUE_COL
      )
      assert model.forecast is None
  
      trained_model = model.model_dict
      assert (
          trained_model["lagged_regressor_dict"]
          == params["lagged_regressor_dict"]
      )
      pred_cols = trained_model["pred_cols"]
      expected_lagged_regression_terms = {
          "regressor1_lag1",
          "regressor1_lag2",
          "regressor1_lag3",
          "regressor1_avglag_7_14_21",
          "regressor1_avglag_8_to_14",
          "regressor2_lag35",
          "regressor2_avglag_35_42_49",
          "regressor2_avglag_30_to_36",
      }
      assert expected_lagged_regression_terms.issubset(pred_cols)
  
      model.predict(test_df)
      expected_forecast_cols = {"ts", "y"}
      assert expected_forecast_cols.issubset(
          list(model.forecast.columns)
      )
  
      # Passes forecast horizon of 10, and uncertainty dict
      model = SilverkiteEstimator(
          uncertainty_dict=params["uncertainty_dict"],
          lagged_regressor_dict=params["lagged_regressor_dict"],
          forecast_horizon=10,
      )
      model.fit(
          train_df, time_col=cst.TIME_COL, value_col=cst.VALUE_COL
      )
      assert model.forecast is None
  
      trained_model = model.model_dict
      pred_cols = trained_model["pred_cols"]
      expected_lagged_regression_terms = {
          "regressor1_lag1",
          "regressor1_lag2",
          "regressor1_lag3",
          "regressor1_avglag_7_14_21",
          "regressor1_avglag_8_to_14",
          "regressor2_lag35",
          "regressor2_avglag_35_42_49",
          "regressor2_avglag_30_to_36",
      }
      assert expected_lagged_regression_terms.issubset(pred_cols)
  
      model.predict(test_df)
      expected_forecast_cols = {
          "ts",
          "y",
          cst.QUANTILE_SUMMARY_COL,
          "err_std",
          "forecast_lower",
          "forecast_upper",
      }
      assert expected_forecast_cols.issubset(
          list(model.forecast.columns)
      )
  
imports: import datetime
  import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal
  from sklearn.linear_model import SGDRegressor
  from sklearn.metrics import mean_squared_error
  import greykite.common.constants
  from greykite.algo.forecast.silverkite.forecast_silverkite import SilverkiteForecast
  from greykite.common.features.timeseries_features import convert_date_to_continuous_time
  from greykite.common.features.timeseries_impute import impute_with_lags
  from greykite.common.python_utils import assert_equal
  from greykite.common.testing_utils import daily_data_reg
  from greykite.common.testing_utils import generate_df_for_tests
  from greykite.common.testing_utils import generate_df_with_reg_for_tests
  from greykite.sklearn.estimator.silverkite_estimator import SilverkiteEstimator
  from greykite.sklearn.estimator.testing_utils import params_component_breakdowns
  from greykite.sklearn.estimator.testing_utils import params_components
label_desc: Use image node_id 15 for calling a global function with example usage: test_lagged_regressors(daily_data_with_reg, params) without return types