class_docstr: Naïve 2 forecaster as described in the M4 Competition Guide:
  http://www.unic.ac.cy/test/wp-content/uploads/sites/2/2018/09/M4-Competitors-Guide.pdf
  
  The Python analogue implementation to:
  https://github.com/Mcompetitions/M4-methods/blob/master/Benchmarks%20and%20Evaluation.R#L118
  
  Parameters
  ----------
  prediction_length
      Number of time points to predict
  season_length
      Length of the seasonality pattern of the input data
class_docstr_tok: ["Na\u00efve","2","forecaster","as","described","in","the","M4","Competition","Guide",":","http",":","\/\/www.unic.ac.cy\/test\/wp-content\/uploads\/sites\/2\/2018\/09\/M4-Competitors-Guide.pdf","The","Python","analogue","implementation","to",":","https",":","\/\/github.com\/Mcompetitions\/M4-methods\/blob\/master\/Benchmarks","%","20and","%","20Evaluation.R","#","L118","Parameters","--","--","--","--","--","prediction_length","Number","of","time","points","to","predict","season_length","Length","of","the","seasonality","pattern","of","the","input","data"]
code: def predict_item(self, item: DataEntry) -> Forecast:
      past_ts_data = item["target"]
      item_id = item.get("item_id", None)
      forecast_start_time = forecast_start(item)
  
      assert (
          len(past_ts_data) >= 1
      ), "all time series should have at least one data point"
  
      prediction = naive_2(
          past_ts_data, self.prediction_length, self.season_length
      )
  
      samples = np.array([prediction])
  
      return SampleForecast(
          samples=samples,
          start_date=forecast_start_time,
          item_id=item_id,
      )
  
file_path: gluonts/src/gluonts/ext/naive_2/_predictor.py
imports: import numpy
  import statsmodels.api
  from gluonts.core.component import validated
  from gluonts.dataset.common import DataEntry
  from gluonts.dataset.util import forecast_start
  from gluonts.model.forecast import Forecast, SampleForecast
  from gluonts.model.predictor import RepresentablePredictor
label_desc: Use image node_id 2 for calling the Naive2Predictor obj's underlying member method code with example usage: obj.predict_item(item) and returns: SampleForecast