code: def test_sparse_integral_dtype_fails(x_dtype, y_dtype, nlp_20news):
      X, y = nlp_20news
  
      X = X.astype(x_dtype)
      y = y.astype(y_dtype)
  
      model = MultinomialNB()
  
      with pytest.raises(ValueError):
          model.fit(X, y)
  
      X = X.astype(cp.float32)
      model.fit(X, y)
  
      X = X.astype(x_dtype)
  
      with pytest.raises(ValueError):
          model.predict(X)
  
imports: from cuml.internals.safe_imports import cpu_only_import
  import math
  from sklearn.naive_bayes import GaussianNB
  from sklearn.naive_bayes import ComplementNB
  from sklearn.naive_bayes import CategoricalNB
  from sklearn.naive_bayes import BernoulliNB
  from sklearn.naive_bayes import MultinomialNB
  from numpy.testing import assert_array_almost_equal, assert_raises
  from numpy.testing import assert_allclose, assert_array_equal
  from cuml.datasets import make_classification
  from cuml.internals.input_utils import sparse_scipy_to_cp
  from cuml.naive_bayes import GaussianNB
  from cuml.naive_bayes import ComplementNB
  from cuml.naive_bayes import CategoricalNB
  from cuml.naive_bayes import BernoulliNB
  from cuml.naive_bayes import MultinomialNB
  from sklearn.metrics import accuracy_score
  import pytest
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 1 for calling a global function with example usage: test_sparse_integral_dtype_fails(x_dtype, y_dtype, nlp_20news) without return types