code: def initparam(
      alpha: float,
      beta: float,
      gamma: float,
      phi: float,
      trendtype: str,
      seasontype: str,
      damped: bool,
      lower: np.ndarray,
      upper: np.ndarray,
      m: int,
      bounds: str,
  ):
      if bounds == "admissible":
          lower[:3] = lower[:3] * 0
          upper[:3] = upper[:3] * 0 + 1e-3
      elif (lower > upper).any():
          raise Exception("Inconsistent parameter boundaries")
      # select alpha
      if np.isnan(alpha):
          alpha = lower[0] + 0.2 * (upper[0] - lower[0]) / m
          if alpha > 1 or alpha < 0:
              alpha = lower[0] + 2e-3
      # select beta
      if trendtype != "N" and np.isnan(beta):
          # ensure beta < alpha
          upper[1] = min(upper[1], alpha)
          beta = lower[1] + 0.1 * (upper[1] - lower[1])
          if beta < 0 or beta > alpha:
              beta = alpha - 1e-3
      # select gamma
      if seasontype != "N" and np.isnan(gamma):
          upper[2] = min(upper[2], 1 - alpha)
          gamma = lower[2] + 0.05 * (upper[2] - lower[2])
          if gamma < 0 or gamma > 1 - alpha:
              gamma = 1 - alpha - 1e-3
      # select phi
      if damped and np.isnan(phi):
          phi = lower[3] + 0.99 * (upper[3] - lower[3])
          if phi < 0 or phi > 1:
              phi = upper[3] - 1e-3
      return {"alpha": alpha, "beta": beta, "gamma": gamma, "phi": phi}
  
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 6 for calling a global function with example usage: initparam(alpha, beta, gamma, phi, trendtype, seasontype, damped, lower, upper, m, bounds) and returns: dict