code: def test_naive_bayes_cuda():
      """
      Assuming here that the Dask serializers are well-tested.
      This test-case is only validating that the Naive Bayes class
      actually gets registered w/ `dask` and `cuda` serializers.
      """
  
      mnb = MultinomialNB()
  
      X = cupyx.scipy.sparse.random(1, 5)
      y = cp.array([0])
  
      mnb.fit(X, y)
  
      # Unfortunately, Dask has no `unregister` function and Pytest
      # shares the same process so cannot test the base-state here.
  
      stype, sbytes = ser(mnb, serializers=["cuda"])
      assert stype["serializer"] == "cuda"
  
      stype, sbytes = ser(mnb, serializers=["dask"])
      assert stype["serializer"] == "dask"
  
      stype, sbytes = ser(mnb, serializers=["pickle"])
      assert stype["serializer"] == "pickle"
  
imports: from distributed.protocol.serialize import serialize
  from cuml.naive_bayes.naive_bayes import MultinomialNB
  import pickle
  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_naive_bayes_cuda() without return types