code: def test_austourists_multiplicative(printer, austourists):
      """https://otexts.com/fpp2/holt-winters.html#example-international-tourist-visitor-nights-in-australia"""
  
      model = HoltWinters(
          alpha=0.441,
          beta=0.03,
          gamma=0.002,
          seasonality=4,
          multiplicative=True,
      )
      model.level.append(32.4875)
      model.trend.append(0.6974)
      model.season.extend([1.2442, 0.7704, 0.9618, 1.0237])
      model._initialized = True
  
      template = "{:>2d} | {:>8.2f} | {:>8.2f} | {:>8.2f} | {:>11.2f} | {:>8.2f}"
      printer(
          "t  | y        | level    | trend    | seasonality | y_pred"
      )
      printer(
          "------------------------------------------------------------"
      )
  
      for t, y in enumerate(austourists, start=1):
          y_pred = model.forecast(1)[0]
          model.learn_one(y)
          printer(
              template.format(
                  t,
                  y,
                  model.level[-1],
                  model.trend[-1],
                  model.season[-1],
                  y_pred,
              )
          )
  
      for h, y_pred in enumerate(model.forecast(8), start=1):
          printer(
              f"{t + h:>2d} |          |          |          |             |    {y_pred:.2f}"
          )
  
      expected = """
  t  | y        | level    | trend    | seasonality | y_pred
  ------------------------------------------------------------
   1 |    42.21 |    33.51 |     0.71 |        1.24 |    41.29
   2 |    24.65 |    33.24 |     0.68 |        0.77 |    26.36
   3 |    32.67 |    33.94 |     0.68 |        0.96 |    32.62
   4 |    37.26 |    35.40 |     0.70 |        1.02 |    35.44
   5 |    45.24 |    36.22 |     0.71 |        1.24 |    44.92
   6 |    29.35 |    37.44 |     0.72 |        0.77 |    28.44
   7 |    36.34 |    38.00 |     0.72 |        0.96 |    36.71
   8 |    41.78 |    39.64 |     0.74 |        1.02 |    39.64
   9 |    49.28 |    40.04 |     0.73 |        1.24 |    50.25
  10 |    31.28 |    40.70 |     0.73 |        0.77 |    31.41
  11 |    37.85 |    40.51 |     0.70 |        0.96 |    39.84
  12 |    38.84 |    39.77 |     0.66 |        1.02 |    42.20
  13 |    51.24 |    40.76 |     0.67 |        1.24 |    50.30
  14 |    31.84 |    41.39 |     0.67 |        0.77 |    31.91
  15 |    41.32 |    42.46 |     0.68 |        0.96 |    40.44
  16 |    42.80 |    42.55 |     0.66 |        1.02 |    44.16
  17 |    55.71 |    43.90 |     0.68 |        1.24 |    53.77
  18 |    33.41 |    44.05 |     0.67 |        0.77 |    34.35
  19 |    42.32 |    44.40 |     0.66 |        0.96 |    43.00
  20 |    45.16 |    44.64 |     0.65 |        1.02 |    46.13
  21 |    59.58 |    46.43 |     0.68 |        1.24 |    56.35
  22 |    34.84 |    46.28 |     0.66 |        0.77 |    36.29
  23 |    44.84 |    46.80 |     0.65 |        0.96 |    45.14
  24 |    46.97 |    46.76 |     0.63 |        1.02 |    48.57
  25 |    60.02 |    47.76 |     0.64 |        1.24 |    58.98
  26 |    38.37 |    49.03 |     0.66 |        0.77 |    37.28
  27 |    46.98 |    49.32 |     0.65 |        0.96 |    47.78
  28 |    50.73 |    49.79 |     0.64 |        1.02 |    51.14
  29 |    61.65 |    50.04 |     0.63 |        1.24 |    62.77
  30 |    39.30 |    50.82 |     0.64 |        0.77 |    39.03
  31 |    52.67 |    52.92 |     0.68 |        0.96 |    49.49
  32 |    54.33 |    53.37 |     0.67 |        1.02 |    54.86
  33 |    66.83 |    53.89 |     0.67 |        1.24 |    67.26
  34 |    40.87 |    53.90 |     0.65 |        0.77 |    42.03
  35 |    51.83 |    54.26 |     0.64 |        0.96 |    52.46
  36 |    57.49 |    55.46 |     0.66 |        1.02 |    56.19
  37 |    65.25 |    54.49 |     0.61 |        1.24 |    69.84
  38 |    43.06 |    55.46 |     0.62 |        0.77 |    42.44
  39 |    54.76 |    56.46 |     0.63 |        0.96 |    53.93
  40 |    59.83 |    57.69 |     0.65 |        1.02 |    58.43
  41 |    73.26 |    58.57 |     0.66 |        1.24 |    72.59
  42 |    47.70 |    60.42 |     0.69 |        0.77 |    45.62
  43 |    61.10 |    62.17 |     0.72 |        0.96 |    58.77
  44 |    66.06 |    63.62 |     0.74 |        1.02 |    64.38
  45 |          |          |          |             |    80.09
  46 |          |          |          |             |    50.16
  47 |          |          |          |             |    63.34
  48 |          |          |          |             |    68.18
  49 |          |          |          |             |    83.80
  50 |          |          |          |             |    52.45
  51 |          |          |          |             |    66.21
  52 |          |          |          |             |    71.23"""
  
      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 8 for calling a global function with example usage: test_austourists_multiplicative(printer, austourists) without return types