docstr: When the training data history is constant, Prophet should predict the same value for all future dates.
docstr_tok: ["When","the","training","data","history","is","constant",",","Prophet","should","predict","the","same","value","for","all","future","dates","."]
code: def test_fit_predict_constant_history(
      self, daily_univariate_ts, backend
  ):
      """
      When the training data history is constant, Prophet should predict the same value for all future dates.
      """
      for constant in [0, 20]:
          train, test = train_test_split(
              daily_univariate_ts, daily_univariate_ts.shape[0] // 2
          )
          train["y"] = constant
          forecaster = Prophet(stan_backend=backend)
          forecaster.fit(train)
          result = forecaster.predict(test)
          assert result["yhat"].values[-1] == constant
  
imports: import numpy
  import pandas
  import pytest
  from prophet import Prophet
  from prophet.utilities import warm_start_params
label_desc: Use image node_id 10 for calling the TestProphetFitPredictDefault obj's underlying member method code with example usage: obj.test_fit_predict_constant_history(daily_univariate_ts, backend) without return types