code: def thetaforecast(states, n, modeltype, f, h, alpha, theta):
      # compute forecasts
      new_states = thetafcst(
          states=states,
          i=n,
          modeltype=modeltype,
          f=f,
          h=h,
          alpha=alpha,
          theta=theta,
      )
      return new_states
  
imports: import math
  from typing import Tuple
  import numpy
  from numba import njit
  from scipy.stats import norm
  from statsmodels.tsa.seasonal import seasonal_decompose
  from statsmodels.tsa.stattools import acf
  from .ets import restrict_to_bounds, results
  from .utils import _seasonal_naive, _repeat_val_seas, CACHE, NOGIL
label_desc: Use image node_id 5 for calling a global function with example usage: thetaforecast(states, n, modeltype, f, h, alpha, theta) and returns: new_states