code: def _test_hmm_raises(func, X, priors):
      X = numpy.array(X, dtype="float32")
      priors = numpy.array(priors, dtype="float32")[None, :, :]
  
      assert_raises(ValueError, func, X, None, priors + 1)
      assert_raises(ValueError, func, X, None, priors - 1)
      assert_raises(ValueError, func, X, None, priors / 2.0)
      assert_raises(ValueError, func, X, None, priors[:, :5])
      assert_raises(ValueError, func, X[:, :5], None, priors)
      assert_raises(ValueError, func, X, None, priors[:, :, 0])
      assert_raises(ValueError, func, X, None, priors[:, :, :1])
  
imports: import os
  import numpy
  import torch
  import pytest
  from pomegranate.gmm import GeneralMixtureModel
  from pomegranate.hmm import DenseHMM
  from pomegranate.distributions import Exponential
  from nose.tools import assert_raises
  from numpy.testing import assert_array_equal
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 22 for calling a global function with example usage: _test_hmm_raises(func, X, priors) without return types