code: def _initialization_simple(
      endog, trend=False, seasonal=False, seasonal_periods=None
  ):
      # See Section 7.6 of Hyndman and Athanasopoulos
      nobs = len(endog)
      initial_trend = None
      initial_seasonal = None
  
      # Non-seasonal
      if seasonal is None or not seasonal:
          initial_level = endog[0]
          if trend == "add":
              initial_trend = endog[1] - endog[0]
          elif trend == "mul":
              initial_trend = endog[1] / endog[0]
      # Seasonal
      else:
          if nobs < 2 * seasonal_periods:
              raise ValueError(
                  "Cannot compute initial seasonals using"
                  " heuristic method with less than two full"
                  " seasonal cycles in the data."
              )
  
          initial_level = np.mean(endog[:seasonal_periods])
          m = seasonal_periods
  
          if trend is not None:
              initial_trend = (
                  pd.Series(endog).diff(m)[m : 2 * m] / m
              ).mean()
  
          if seasonal == "add":
              initial_seasonal = endog[:m] - initial_level
          elif seasonal == "mul":
              initial_seasonal = endog[:m] / initial_level
  
      return initial_level, initial_trend, initial_seasonal
  
imports: import numpy
  import pandas
label_desc: Use image node_id 1 for calling a global function with example usage: _initialization_simple(endog, trend, seasonal, seasonal_periods) and returns: initial_level,  initial_trend,  initial_seasonal