code: def test_criterion(self, implementation):
      random_state = check_random_state(2013)
      m1 = self.new_hmm(implementation)
      # Spread the means out to make this easier
      m1.means_ *= 10
  
      X, _ = m1.sample(4000, random_state=random_state)
      aic = []
      bic = []
      ns = [2, 3, 4, 5]
      for n in ns:
          h = GMMHMM(
              n,
              n_mix=2,
              covariance_type=self.covariance_type,
              random_state=random_state,
              implementation=implementation,
          )
          h.fit(X)
          aic.append(h.aic(X))
          bic.append(h.bic(X))
  
      assert np.all(aic) > 0
      assert np.all(bic) > 0
  
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 10 for calling the GMMHMMTestMixin obj's underlying member method code with example usage: obj.test_criterion(implementation) without return types