code: def test_sample(self, n_samples=1000):
      h = hmm.GMMHMM(
          self.n_components, covariance_type=self.covariance_type
      )
      h.startprob_ = self.startprob
      h.transmat_ = self.transmat
      h.gmms_ = self.gmms
      X, state_sequence = h.sample(n_samples)
      assert X.shape == (n_samples, self.n_features)
      assert len(state_sequence) == n_samples
  
imports: import numpy
  from numpy.testing import assert_allclose
  import pytest
  from sklearn.mixture import GaussianMixture
  from sklearn.utils import check_random_state
  from hmmlearn import hmm
  from .None import assert_log_likelihood_increasing, make_covar_matrix, normalized
label_desc: Use image node_id 3 for calling the GMMHMMTestMixin obj's underlying member method code with example usage: obj.test_sample(n_samples) without return types