code: def test_ausair(printer, ausair):
      """https://otexts.com/fpp2/holt.html#example-air-passengers"""
  
      model = HoltWinters(alpha=0.8302, beta=1e-04)
      model.level.append(15.5715)
      model.trend.append(2.1017)
      model._initialized = True
  
      template = "{:>2d} | {:>8.2f} | {:>8.2f} | {:>8.2f} | {:>8.2f}"
      printer("t  | y        | level    | trend    | y_pred")
      printer("----------------------------------------------")
  
      for t, y in enumerate(ausair, start=1):
          y_pred = model.forecast(1)[0]
          model.learn_one(y)
          printer(
              template.format(
                  t, y, model.level[-1], model.trend[-1], y_pred
              )
          )
  
      for h, y_pred in enumerate(model.forecast(5), start=1):
          printer(
              f"{t + h:>2d} |          |          |          |    {y_pred:.2f}"
          )
  
      expected = """
  t  | y        | level    | trend    | y_pred
  ----------------------------------------------
   1 |    17.55 |    17.57 |     2.10 |    17.67
   2 |    21.86 |    21.49 |     2.10 |    19.68
   3 |    23.89 |    23.84 |     2.10 |    23.59
   4 |    26.93 |    26.76 |     2.10 |    25.94
   5 |    26.89 |    27.22 |     2.10 |    28.86
   6 |    28.83 |    28.92 |     2.10 |    29.33
   7 |    30.08 |    30.24 |     2.10 |    31.02
   8 |    30.95 |    31.19 |     2.10 |    32.34
   9 |    30.19 |    30.71 |     2.10 |    33.29
  10 |    31.58 |    31.79 |     2.10 |    32.81
  11 |    32.58 |    32.80 |     2.10 |    33.89
  12 |    33.48 |    33.72 |     2.10 |    34.90
  13 |    39.02 |    38.48 |     2.10 |    35.82
  14 |    41.39 |    41.25 |     2.10 |    40.58
  15 |    41.60 |    41.89 |     2.10 |    43.35
  16 |    44.66 |    44.54 |     2.10 |    44.00
  17 |    46.95 |    46.90 |     2.10 |    46.65
  18 |    48.73 |    48.78 |     2.10 |    49.00
  19 |    51.49 |    51.38 |     2.10 |    50.88
  20 |    50.03 |    50.61 |     2.10 |    53.49
  21 |    60.64 |    59.30 |     2.10 |    52.72
  22 |    63.36 |    63.03 |     2.10 |    61.40
  23 |    66.36 |    66.15 |     2.10 |    65.13
  24 |    68.20 |    68.21 |     2.10 |    68.25
  25 |    68.12 |    68.49 |     2.10 |    70.31
  26 |    69.78 |    69.92 |     2.10 |    70.60
  27 |    72.60 |    72.50 |     2.10 |    72.02
  28 |          |          |          |    74.60
  29 |          |          |          |    76.70
  30 |          |          |          |    78.80
  31 |          |          |          |    80.91
  32 |          |          |          |    83.01
  """
  
      assert repr(printer).strip() == expected.strip()
  
file_path: river/river/time_series/test_holt_winters.py
imports: from __future__ import annotations
  import io
  import pytest
  from river.time_series import HoltWinters
label_desc: Use image node_id 6 for calling a global function with example usage: test_ausair(printer, ausair) without return types