code: def test_cases(self):
      # Test against known results
      for unconstrained, error_variance, constrained in self.cases:
          result = tools.constrain_stationary_multivariate(
              unconstrained, error_variance
          )
          assert_allclose(result[0], constrained)
  
      # Test that the constrained results correspond to companion matrices
      # with eigenvalues less than 1 in modulus
      for unconstrained in self.eigval_cases:
          if type(unconstrained) is list:
              cov = np.eye(unconstrained[0].shape[0])
          else:
              cov = np.eye(unconstrained.shape[0])
          constrained, _ = tools.constrain_stationary_multivariate(
              unconstrained, cov
          )  # noqa:E501
          companion = tools.companion_matrix(
              [1]
              + [
                  -np.squeeze(constrained[i])
                  for i in range(len(constrained))
              ]
          ).T
          assert_array_less(np.abs(np.linalg.eigvals(companion)), 1)
  
imports: import pytest
  import numpy
  from numpy.testing import assert_allclose, assert_equal, assert_array_less, assert_array_equal, assert_almost_equal
  import pandas
  from scipy.linalg import solve_discrete_lyapunov
  from statsmodels.tsa.statespace import tools
  from statsmodels.tsa.stattools import acovf
label_desc: Use image node_id 1 for calling the TestConstrainStationaryMultivariate obj's underlying member method code with example usage: obj.test_cases() without return types