code: def update(
      oldl,
      l,
      oldb,
      b,
      olds,
      s,
      m,
      trend,
      season,
      alpha,
      beta,
      gamma,
      phi,
      y,
  ):
      # New Level
      if trend == NONE:
          q = oldl  # l(t - 1)
          phib = 0
      elif trend == ADD:
          phib = phi * oldb
          q = oldl + phib  # l(t - 1) + phi * b(t - 1)
      elif math.fabs(phi - 1.0) < TOL:
          phib = oldb
          q = oldl * oldb  # l(t - 1) * b(t - 1)
      else:
          phib = math.pow(oldb, phi)
          q = oldl * phib  # l(t - 1) * b(t - 1)^phi
      # season
      if season == NONE:
          p = y
      elif season == ADD:
          p = y - olds[m - 1]  # y[t] - s[t - m]
      else:
          if math.fabs(olds[m - 1]) < TOL:
              p = HUGEN
          else:
              p = y / olds[m - 1]  # y[t] / s[t - m]
      l = q + alpha * (p - q)
      # New Growth
      if trend > NONE:
          if trend == ADD:
              r = l - oldl  # l[t] - l[t-1]
          else:  # if(trend == MULT)
              if math.fabs(oldl) < TOL:
                  r = HUGEN
              else:
                  r = l / oldl  # l[t] / l[t-1]
          b = phib + (beta / alpha) * (r - phib)
          # b[t] = phi*b[t-1] + beta*(r - phi*b[t-1])
          # b[t] = b[t-1]^phi + beta*(r - b[t-1]^phi)
      # New Seasonal
      if season > NONE:
          if season == ADD:
              t = y - q
          else:  # if(season == MULT)
              if math.fabs(q) < TOL:
                  t = HUGEN
              else:
                  t = y / q
          s[0] = olds[m - 1] + gamma * (
              t - olds[m - 1]
          )  # s[t] = s[t - m] + gamma * (t - s[t - m])
          for j in range(1, m):
              s[j] = olds[j - 1]  # s[t] = s[t]
      return l, b, s
  
imports: import math
  from collections import namedtuple
  from typing import Tuple
  import numpy
  from numba import njit
  from numba.typed import List
  from statsmodels.tsa.seasonal import seasonal_decompose
  from .utils import _calculate_intervals, CACHE, NOGIL
label_desc: Use image node_id 3 for calling a global function with example usage: update(oldl, l, oldb, b, olds, s, m, trend, season, alpha, beta, gamma, phi, y) and returns: l,  b,  s