code: def constrain_stationary_multivariate(
      unconstrained, variance, transform_variance=False, prefix=None
  ):
      use_list = type(unconstrained) is list
      if use_list:
          unconstrained = np.concatenate(unconstrained, axis=1)
  
      k_endog, order = unconstrained.shape
      order //= k_endog
  
      if order < 1:
          raise ValueError("Must have order at least 1")
      if k_endog < 1:
          raise ValueError("Must have at least 1 endogenous variable")
  
      if prefix is None:
          prefix, dtype, _ = find_best_blas_type(
              [unconstrained, variance]
          )
      dtype = prefix_dtype_map[prefix]
  
      unconstrained = np.asfortranarray(unconstrained, dtype=dtype)
      variance = np.asfortranarray(variance, dtype=dtype)
  
      # Step 1: convert from arbitrary matrices to those with singular values
      # less than one.
      # sv_constrained = _constrain_sv_less_than_one(unconstrained, order,
      #                                              k_endog, prefix)
      sv_constrained = prefix_sv_map[prefix](
          unconstrained, order, k_endog
      )
  
      # Step 2: convert matrices from our "partial autocorrelation matrix"
      # space (matrices with singular values less than one) to the space of
      # stationary coefficient matrices
      constrained, variance = prefix_pacf_map[prefix](
          sv_constrained, variance, transform_variance, order, k_endog
      )
  
      constrained = np.array(constrained, dtype=dtype)
      variance = np.array(variance, dtype=dtype)
  
      if use_list:
          constrained = [
              constrained[:k_endog, i * k_endog : (i + 1) * k_endog]
              for i in range(order)
          ]
  
      return constrained, variance
  
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 12 for calling a global function with example usage: constrain_stationary_multivariate(unconstrained, variance, transform_variance, prefix) and returns: constrained,  variance