code: def test_hourly_data(df_hourly):
      """Tests functionality on hourly data."""
      df_train = df_hourly["df_train"]
      df_test = df_hourly["df_test"]
  
      model = LagBasedEstimator(
          series_na_fill_func=lambda s: s.bfill().ffill()
      )
      model.fit(df_train)
      # Checks ``model.df``.
      # It should include the past 1 week data interpolated.
      # The interpolated values are zero with the default function.
      df_expanded = pd.concat(
          [
              pd.DataFrame(
                  {
                      "ts": pd.date_range(
                          start=df_train["ts"].iloc[0]
                          - timedelta(weeks=1),
                          periods=7 * 24,
                          freq="H",
                      ),
                      "y": 0.0,
                  }
              ),
              df_train,
          ],
          axis=0,
      ).reset_index(drop=True)
      assert model.df.equals(df_expanded)
      assert model.uncertainty_model is None
      assert model.max_lag_order == 1
      assert model.min_lag_order == 1
      assert model.train_start == df_train["ts"].iloc[0]
      assert model.train_end == df_train["ts"].iloc[-1]
  
      # Checks prediction within training.
      df_fit = model.predict(df_train)
      # The value column should be the same as the input.
      assert df_fit["y"].equals(df_train["y"].astype(float))
      # The predicted column is the last week.
      assert (
          df_fit[PREDICTED_COL]
          .iloc[-5:]
          .reset_index(drop=True)
          .equals(
              df_fit["y"]
              .iloc[-(24 * 7 + 5) : -(24 * 7)]
              .reset_index(drop=True)
          )
      )
      assert list(df_fit.columns) == ["ts", "y", PREDICTED_COL]
  
      # Checks prediction in the future.
      df_pred = model.predict(df_test)
      # The value column should be NANs.
      assert all(df_pred["y"].isna())
      # The predicted column is the last week.
      assert (
          df_pred[PREDICTED_COL]
          .iloc[: (24 * 7)]
          .reset_index(drop=True)
          .equals(df_fit["y"].iloc[-(24 * 7) :].reset_index(drop=True))
      )
      # The future predictions use the predicted values.
      assert (
          df_pred[PREDICTED_COL]
          .iloc[(24 * 7) : (24 * 14)]
          .reset_index(drop=True)
          .equals(
              df_pred[PREDICTED_COL]
              .iloc[: (24 * 7)]
              .reset_index(drop=True)
          )
      )
  
imports: from datetime import timedelta
  import numpy
  import pandas
  import pytest
  from dateutil.relativedelta import relativedelta
  from testfixtures import LogCapture
  from greykite.common.constants import ERR_STD_COL
  from greykite.common.constants import LOGGER_NAME
  from greykite.common.constants import PREDICTED_COL
  from greykite.common.constants import PREDICTED_LOWER_COL
  from greykite.common.constants import PREDICTED_UPPER_COL
  from greykite.sklearn.estimator.lag_based_estimator import LagBasedEstimator
label_desc: Use image node_id 7 for calling a global function with example usage: test_hourly_data(df_hourly) without return types