code: def etsforecast(x, m, trend, season, phi, h, f):
      s = np.zeros(m)
      if m < 1:
          m = 1
      # Copy initial state components
      l = x[0]
      b = 0.0
      if trend > NONE:
          b = x[1]
      if season > NONE:
          for j in range(m):
              s[j] = x[(trend > NONE) + j + 1]
  
      # compute forecasts
      forecast(l, b, s, m, trend, season, phi, f, h)
  
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 5 for calling a global function with example usage: etsforecast(x, m, trend, season, phi, h, f) without return types