code: def etssimulate(
      x, m, error, trend, season, alpha, beta, gamma, phi, h, y, e
  ):
      oldb = 0.0
      olds = np.zeros(24)
      s = np.zeros(24)
      f = np.zeros(10)
      if m > 24 and season > NONE:
          return
      elif m < 1:
          m = 1
      # nstates = m * (season > NONE) + 1 + (trend > NONE)
      # Copy initial state components
      l = x[0]
      if trend > NONE:
          b = x[1]
      if season > NONE:
          for j in range(m):
              s[j] = x[(trend > NONE) + j + 1]
      for i in range(h):
          # Copy previous state
          oldl = l
          if trend > NONE:
              oldb = b
          if season > NONE:
              for j in range(m):
                  olds[j] = s[j]
          # one step forecast
          forecast(oldl, oldb, olds, m, trend, season, phi, f, 1)
          if math.fabs(f[0] - NA) < TOL:
              y[0] = NA
              return
          if error == ADD:
              y[i] = f[0] + e[i]
          else:
              y[i] = f[0] * (1.0 + e[i])
          # Update state
          l, b, s = update(
              oldl,
              l,
              oldb,
              b,
              olds,
              s,
              m,
              trend,
              season,
              alpha,
              beta,
              gamma,
              phi,
              y[i],
          )
  
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 4 for calling a global function with example usage: etssimulate(x, m, error, trend, season, alpha, beta, gamma, phi, h, y, e) without return types