code: def constrain_stationary_univariate(unconstrained):
      """
      Transform unconstrained parameters used by the optimizer to constrained
      parameters used in likelihood evaluation
  
      Parameters
      ----------
      unconstrained : ndarray
          Unconstrained parameters used by the optimizer, to be transformed to
          stationary coefficients of, e.g., an autoregressive or moving average
          component.
  
      Returns
      -------
      constrained : ndarray
          Constrained parameters of, e.g., an autoregressive or moving average
          component, to be transformed to arbitrary parameters used by the
          optimizer.
  
      References
      ----------
      .. [*] Monahan, John F. 1984.
         "A Note on Enforcing Stationarity in
         Autoregressive-moving Average Models."
         Biometrika 71 (2) (August 1): 403-404.
      """
  
      n = unconstrained.shape[0]
      y = np.zeros((n, n), dtype=unconstrained.dtype)
      r = unconstrained / ((1 + unconstrained**2) ** 0.5)
      for k in range(n):
          for i in range(k):
              y[k, i] = y[k - 1, i] + r[k] * y[k - 1, k - i - 1]
          y[k, k] = r[k]
      return -y[n - 1, :]
  
imports: import numpy
  from scipy.linalg import solve_sylvester
  import pandas
  from statsmodels.compat.pandas import Appender
  from statsmodels.tools.data import _is_using_pandas
  from scipy.linalg.blas import find_best_blas_type
  from .None import _initialization, _representation, _kalman_filter, _kalman_smoother, _simulation_smoother, _cfa_simulation_smoother, _tools
label_desc: Use image node_id 7 for calling a global function with example usage: constrain_stationary_univariate(unconstrained) and returns: unknown