code: def prep_params(
      n_comps, n_mix, n_features, covar_type, low, high, random_state
  ):
      # the idea is to generate ``n_comps`` bounding boxes and then
      # generate ``n_mix`` mixture means in each of them
  
      dim_lims = np.zeros((n_comps + 1, n_features))
  
      # this generates a sequence of coordinates, which are then used as
      # vertices of bounding boxes for mixtures
      dim_lims[1:] = np.cumsum(
          random_state.uniform(low, high, (n_comps, n_features)), axis=0
      )
  
      means = np.zeros((n_comps, n_mix, n_features))
      for i, (left, right) in enumerate(zip(dim_lims, dim_lims[1:])):
          means[i] = sample_from_parallelepiped(
              left, right, n_mix, random_state
          )
  
      startprob = np.zeros(n_comps)
      startprob[0] = 1
  
      transmat = normalized(
          random_state.uniform(size=(n_comps, n_comps)), axis=1
      )
  
      if covar_type == "spherical":
          covs = random_state.uniform(0.1, 5, size=(n_comps, n_mix))
      elif covar_type == "diag":
          covs = random_state.uniform(
              0.1, 5, size=(n_comps, n_mix, n_features)
          )
      elif covar_type == "tied":
          covs = np.zeros((n_comps, n_features, n_features))
          for i in range(n_comps):
              low = random_state.uniform(
                  -2, 2, (n_features, n_features)
              )
              covs[i] = low.T @ low
      elif covar_type == "full":
          covs = np.zeros((n_comps, n_mix, n_features, n_features))
          for i in range(n_comps):
              for j in range(n_mix):
                  low = random_state.uniform(
                      -2, 2, size=(n_features, n_features)
                  )
                  covs[i, j] = low.T @ low
  
      weights = normalized(
          random_state.uniform(size=(n_comps, n_mix)), axis=1
      )
  
      return covs, means, startprob, transmat, weights
  
imports: import numpy
  from numpy.testing import assert_allclose, assert_array_less
  import pytest
  from sklearn.utils import check_random_state
  from ..hmm import GMMHMM
  from .test_gmm_hmm import create_random_gmm
  from .None import assert_log_likelihood_increasing, normalized
label_desc: Use image node_id 2 for calling a global function with example usage: prep_params(n_comps, n_mix, n_features, covar_type, low, high, random_state) and returns: covs,  means,  startprob,  transmat,  weights