code: def test_past_df_in_predict(daily_data):
      """Tests that ``past_df`` can be passed during prediction."""
      model = BaseSilverkiteEstimator()
      train_df = daily_data["train_df"]
      past_df = train_df.iloc[:200]
      train_df = train_df.iloc[200:].reset_index(drop=True)
  
      model.fit(
          X=train_df, time_col=cst.TIME_COL, value_col=cst.VALUE_COL
      )
  
      silverkite = SilverkiteForecast()
      model.model_dict = silverkite.forecast(
          df=train_df,
          time_col=cst.TIME_COL,
          value_col=cst.VALUE_COL,
          origin_for_time_vars=None,
          extra_pred_cols=[],
          train_test_thresh=None,
          training_fraction=None,
          fit_algorithm="linear",
          fit_algorithm_params=None,
          daily_event_df_dict=None,
          changepoints_dict=None,
          fs_components_df=None,
          autoreg_dict=dict(lag_dict=dict(orders=[1])),
          min_admissible_value=None,
          max_admissible_value=None,
          uncertainty_dict=None,
      )
      model.finish_fit()
      coef = model.model_dict["ml_model"].coef_
  
      # Only has intercept and AR_lag1
      assert len(coef) == 2
  
      # ``past_df`` was not passed during training.
      # The ``train_df`` in ``silverkite`` should be ``train_df`` itself.
      # If we try to calculate fitted values on the past,
      # imputation will be performed without passing ``past_df``.
      # However, if we pass ``past_df``, the values in ``past_df``
      # will be used.
      model.past_df = past_df.iloc[[-2]]
      pred = model.predict(X=past_df.iloc[[-1]])
      assert (
          pred[cst.PREDICTED_COL].iloc[0]
          == coef[0] + coef[1] * past_df[cst.VALUE_COL].iloc[-2]
      )
  
imports: import datetime
  import numpy
  import pandas
  import pytest
  from sklearn.exceptions import NotFittedError
  from sklearn.metrics import mean_absolute_error
  from sklearn.metrics import mean_squared_error
  from testfixtures import LogCapture
  import greykite.common.constants
  from greykite.algo.forecast.silverkite.forecast_silverkite import SilverkiteForecast
  from greykite.common.data_loader import DataLoader
  from greykite.common.features.timeseries_features import convert_date_to_continuous_time
  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.base_silverkite_estimator import BaseSilverkiteEstimator
  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 21 for calling a global function with example usage: test_past_df_in_predict(daily_data) without return types