code: def test_hmm_forward(hmm, X, priors):
      X = numpy.array([X])
      priors = priors.unsqueeze(0)
  
      y_hat = hmm.forward(X)
      assert_array_almost_equal(
          y_hat,
          [
              [
                  [-5.2945, -4.1480],
                  [-11.8077, -7.3380],
                  [-29.2766, -12.0687],
                  [-37.8394, -17.7924],
                  [-20.7060, -22.9511],
                  [-63.8272, -29.8389],
                  [-32.2763, -34.3310],
                  [-50.1489, -37.4616],
                  [-39.4228, -41.2870],
                  [-53.4733, -44.0753],
                  [-42.2268, -46.9115],
              ]
          ],
          4,
      )
  
      y_hat = hmm.forward(X, priors=priors)
      assert_array_almost_equal(
          y_hat,
          [
              [
                  [-5.9877, -4.8411],
                  [-13.1940, -8.7243],
                  [-31.3560, -14.1481],
                  [-inf, -19.8719],
                  [-23.4786, -25.7237],
                  [-67.8038, -32.9682],
                  [-35.9164, -38.3766],
                  [-54.5024, -41.8919],
                  [-inf, -45.7173],
                  [-60.5357, -inf],
                  [-58.6873, -65.1636],
              ]
          ],
          4,
      )
  
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 25 for calling a global function with example usage: test_hmm_forward(hmm, X, priors) without return types