code: def triple_exponential_smoothing(
      df, cols, slen, alpha, beta, gamma, n_preds
  ):
      for col in cols:
          result = []
          seasonals = initial_seasonal_components(df[col], slen)
          for i in range(len(df[col]) + n_preds):
              if i == 0:  # initial values
                  smooth = df[col][0]
                  trend = initial_trend(df[col], slen)
                  result.append(df[col][0])
                  continue
              if i >= len(df[col]):  # we are forecasting
                  m = i - len(df[col]) + 1
                  result.append(
                      (smooth + m * trend) + seasonals[i % slen]
                  )
              else:
                  val = df[col][i]
                  last_smooth, smooth = smooth, alpha * (
                      val - seasonals[i % slen]
                  ) + (1 - alpha) * (smooth + trend)
                  trend = (
                      beta * (smooth - last_smooth) + (1 - beta) * trend
                  )
                  seasonals[i % slen] = (
                      gamma * (val - smooth)
                      + (1 - gamma) * seasonals[i % slen]
                  )
                  result.append(smooth + trend + seasonals[i % slen])
          df[col + "_TES"] = result
      # print(seasonals)
      return df
  
imports: import pandas
  import numpy
  import statsmodels.api
  from scipy import signal, integrate
  from pykalman import UnscentedKalmanFilter
  from tsaug import *
  from fbprophet import Prophet
  import pylab
  from seasonal.periodogram import periodogram
label_desc: Use image node_id 10 for calling a global function with example usage: triple_exponential_smoothing(df, cols, slen, alpha, beta, gamma, n_preds) and returns: df