code: def test__check_and_set_multinomial_n_features_n_trials(
      self, implementation
  ):
      h = hmm.MultinomialHMM(
          n_components=2, n_trials=None, implementation=implementation
      )
      h._check_and_set_n_features(
          np.array([[0, 2, 3, 0], [1, 0, 2, 2]])
      )
      assert (h.n_trials == 5).all()
      with pytest.raises(ValueError):  # wrong dimensions
          h._check_and_set_n_features(np.array([[0, 0, 2, 1, 3, 1, 1]]))
      with pytest.raises(ValueError):  # not added up to n_trials
          h._check_and_set_n_features(
              np.array([[0, 0, 1, 1], [3, 1, 1, 0]])
          )
      with pytest.raises(ValueError):  # non-integral
          h._check_and_set_n_features(
              np.array([[0.0, 2.0, 0.0, 3.0], [0.0, 2.5, 2.5, 0.0]])
          )
      with pytest.raises(ValueError):  # negative integers
          h._check_and_set_n_features(
              np.array([[0, -2, 1, 6], [5, 6, -6, 0]])
          )
  
file_path: hmmlearn/lib/hmmlearn/tests/test_multinomial_hmm.py
imports: import numpy
  from numpy.testing import assert_allclose
  import pytest
  from hmmlearn import hmm
  from .None import assert_log_likelihood_increasing, normalized
label_desc: Use image node_id 8 for calling the TestMultinomialHMM obj's underlying member method code with example usage: obj.test__check_and_set_multinomial_n_features_n_trials(implementation) without return types