class_docstr: Holt-Winters forecaster.
  
  This is a standard implementation of the Holt-Winters forecasting method. Certain
  parametrisations result in special cases, such as simple exponential smoothing.
  
  Optimal parameters and initialisation values can be determined in a batch setting. However, in
  an online setting, it is necessary to wait and observe enough values. The first
  `k = max(2, seasonality)` values are indeed used to initialize the components.
  
  **Level initialization**
  
  $$l = \frac{1}{k} \sum_{i=1}{k} y_i$$
  
  **Trend initialization**
  
  $$t = \frac{1}{k - 1} \sum_{i=2}{k} y_i - y_{i-1}$$
  
  **Trend initialization**
  
  $$s_i = \frac{y_i}{k}$$
  
  Parameters
  ----------
  alpha
      Smoothing parameter for the level.
  beta
      Smoothing parameter for the trend.
  gamma
      Smoothing parameter for the seasonality.
  seasonality
      The number of periods in a season. For instance, this should be 4 for quarterly data,
      and 12 for yearly data.
  multiplicative
      Whether or not to use a multiplicative formulation.
  
  Examples
  --------
  
  >>> from river import datasets
  >>> from river import metrics
  >>> from river import time_series
  
  >>> dataset = datasets.AirlinePassengers()
  
  >>> model = time_series.HoltWinters(
  ...     alpha=0.3,
  ...     beta=0.1,
  ...     gamma=0.6,
  ...     seasonality=12,
  ...     multiplicative=True
  ... )
  
  >>> metric = metrics.MAE()
  
  >>> time_series.evaluate(
  ...     dataset,
  ...     model,
  ...     metric,
  ...     horizon=12
  ... )
  +1  MAE: 25.899087
  +2  MAE: 26.26131
  +3  MAE: 25.735903
  +4  MAE: 25.625678
  +5  MAE: 26.093842
  +6  MAE: 26.90249
  +7  MAE: 28.634398
  +8  MAE: 29.284769
  +9  MAE: 31.018351
  +10 MAE: 32.252349
  +11 MAE: 33.518946
  +12 MAE: 33.975057
  
  References
  ----------
  [^1]: [Exponential smoothing — Wikipedia](https://www.wikiwand.com/en/Exponential_smoothing)
  [^2]: [Exponential smoothing — Forecasting: Principles and Practice](https://otexts.com/fpp2/expsmooth.html)
  [^3]: [What is Exponential Smoothing? — Engineering statistics handbook](https://www.itl.nist.gov/div898/handbook/pmc/section4/pmc43.htm)
code: def forecast(self, horizon, xs=None):
      op = operator.mul if self.multiplicative else operator.add
      return [
          op(
              self.level[-1]
              + ((h + 1) * self.trend[-1] if self.trend else 0),
              (
                  self.season[-self.seasonality + h % self.seasonality]
                  if self.season
                  else (1 if self.multiplicative else 0)
              ),
          )
          for h in range(horizon)
      ]
  
imports: from __future__ import annotations
  import operator
  import statistics
  from collections import deque
  from river import time_series
label_desc: Use image node_id 3 for calling the HoltWinters obj's underlying member method code with example usage: obj.forecast(horizon, xs) and returns: unknown