docstr: Check if ``X`` is a sample from a multinomial distribution, i.e. an
  array of non-negative integers, summing up to n_trials.
code: def _check_and_set_n_features(self, X):  # Also sets n_trials.
      """
      Check if ``X`` is a sample from a multinomial distribution, i.e. an
      array of non-negative integers, summing up to n_trials.
      """
      super()._check_and_set_n_features(X)
      if not np.issubdtype(X.dtype, np.integer) or X.min() < 0:
          raise ValueError(
              "Symbol counts should be nonnegative integers"
          )
      if self.n_trials is None:
          self.n_trials = X.sum(axis=1)
      elif not (X.sum(axis=1) == self.n_trials).all():
          raise ValueError(
              "Total count for each sample should add up to "
              "the number of trials"
          )
  
imports: import functools
  import inspect
  import warnings
  import numpy
  from scipy import special
  from scipy.stats import multinomial, poisson
  from sklearn.utils import check_random_state
  from .base import BaseHMM, _AbstractHMM
  from .stats import log_multivariate_normal_density
  from .utils import fill_covars, log_normalize
label_desc: Use image node_id 1 for calling the BaseMultinomialHMM obj's underlying member method code with example usage: obj._check_and_set_n_features(X) without return types