code: def test_stationary_distribution():
      n_components = 10
      h = StubHMM(n_components)
      transmat = np.random.random((n_components, n_components))
      transmat /= np.tile(
          transmat.sum(axis=1)[:, np.newaxis], (1, n_components)
      )
      h.transmat_ = transmat
      stationary = h.get_stationary_distribution()
      assert stationary.dtype == float
      assert (
          h.get_stationary_distribution().T @ h.transmat_
          == pytest.approx(stationary)
      )
  
imports: import numpy
  from numpy.testing import assert_allclose
  import pytest
  from scipy import special
  from hmmlearn.base import BaseHMM, ConvergenceMonitor
  from hmmlearn import _hmmc
label_desc: Use image node_id 2 for calling a global function with example usage: test_stationary_distribution() without return types