code: def test_initialization(self, implementation):
      random_state = check_random_state(234234)
      sequences, lengths = get_sequences(
          50, 10, model=get_mcgrory_titterington()
      )
  
      # dof's have wrong shape
      with pytest.raises(ValueError):
          model = self.new_for_init(implementation)
          model.dof_prior_ = [1, 1, 1]
          assert_log_likelihood_increasing(
              model, sequences, lengths, 10
          )
  
      with pytest.raises(ValueError):
          model = self.new_for_init(implementation)
          model.dof_posterior_ = [1, 1, 1]
          assert_log_likelihood_increasing(
              model, sequences, lengths, 10
          )
  
      # scales's have wrong shape
      with pytest.raises(ValueError):
          model = self.new_for_init(implementation)
          model.scale_prior_ = [2, 2, 2]
          assert_log_likelihood_increasing(
              model, sequences, lengths, 10
          )
  
      with pytest.raises(ValueError):
          model = self.new_for_init(implementation)
          model.scale_posterior_ = [2, 2, 2]  # this is wrong
          assert_log_likelihood_increasing(
              model, sequences, lengths, 10
          )
  
      # Manually setup covariance
      with pytest.raises(ValueError):
          model = vhmm.VariationalGaussianHMM(
              4,
              n_iter=500,
              tol=1e-9,
              init_params="stm",
              covariance_type="incorrect",
              implementation=implementation,
          )
          assert_log_likelihood_increasing(
              model, sequences, lengths, 10
          )
  
      # Set priors correctly via params
      model = vhmm.VariationalGaussianHMM(
          4,
          n_iter=500,
          tol=1e-9,
          random_state=random_state,
          covariance_type=self.covariance_type,
          implementation=implementation,
          means_prior=[[0.0], [0.0], [0.0], [0.0]],
          beta_prior=[2.0, 2.0, 2.0, 2.0],
          dof_prior=[2.0, 2.0, 2.0, 2.0],
          scale_prior=[2, 2, 2, 2],
      )
      assert_log_likelihood_increasing(model, sequences, lengths, 10)
      assert np.all(model.means_prior_ == 0)
      assert np.all(model.beta_prior_ == 2.0)
      assert np.all(model.dof_prior_ == 2.0)
      assert np.all(model.scale_prior_ == 2.0)
  
      # Manually set everything
      model = vhmm.VariationalGaussianHMM(
          4,
          n_iter=500,
          tol=1e-9,
          random_state=random_state,
          covariance_type=self.covariance_type,
          implementation=implementation,
          init_params="",
      )
      model.means_prior_ = [[0.0], [0.0], [0.0], [0.0]]
      model.means_posterior_ = [[2], [1], [3], [4]]
      model.beta_prior_ = [2.0, 2.0, 2.0, 2.0]
      model.beta_posterior_ = [1, 1, 1, 1]
      model.dof_prior_ = [2.0, 2.0, 2.0, 2.0]
      model.dof_posterior_ = [1, 1, 1, 1]
      model.scale_prior_ = [2, 2, 2, 2]
      model.scale_posterior_ = [2, 2, 2, 2]
      assert_log_likelihood_increasing(model, sequences, lengths, 10)
  
imports: import numpy
  import pytest
  from sklearn.utils import check_random_state
  from hmmlearn import hmm, vhmm
  from .None import assert_log_likelihood_increasing, compare_variational_and_em_models, make_covar_matrix, normalized, vi_uniform_startprob_and_transmat
label_desc: Use image node_id 2 for calling the TestSpherical obj's underlying member method code with example usage: obj.test_initialization(implementation) without return types