code: def convert_sklearn_multinomial_naive_bayes(
      operator, device, extra_config
  ):
      """
      Converter for `sklearn.naive_bayes.MultinomialNB`
  
      Args:
          operator: An operator wrapping a `sklearn.naive_bayes.MultinomialNB` model
          device: String defining the type of device the converted operator should be run on
          extra_config: Extra configuration used to select the best conversion strategy
  
      Returns:
          A PyTorch model
      """
      assert operator is not None, "Cannot convert None operator"
  
      model = operator.raw_operator
  
      classes = model.classes_
      if not all(
          [type(x) in [int, np.int32, np.int64] for x in classes]
      ):
          raise RuntimeError(
              "Hummingbird supports only integer labels for class labels."
          )
  
      feature_log_prob_minus_neg_prob = model.feature_log_prob_.T
      jll_calc_bias = model.class_log_prior_.reshape(1, -1)
  
      return BernoulliNBModel(
          operator,
          classes,
          None,
          jll_calc_bias,
          feature_log_prob_minus_neg_prob,
          device,
      )
  
imports: import numpy
  from onnxconverter_common.registration import register_converter
  from .._nb_implementations import BernoulliNBModel, GaussianNBModel
label_desc: Use image node_id 2 for calling a global function with example usage: convert_sklearn_multinomial_naive_bayes(operator, device, extra_config) and returns: BernoulliNBModel