code: def test_kafka_stream_dataset():
      dataset = tfio.IODataset.stream().from_kafka("test").batch(2)
      assert np.all(
          [k.numpy().tolist() for (k, _) in dataset]
          == np.asarray(
              [("D" + str(i)).encode() for i in range(10)]
          ).reshape((5, 2))
      )
  
imports: import sys
  import time
  import pytest
  import numpy
  import threading
  import tensorflow
  import tensorflow_io
label_desc: Use image node_id 4 for calling a global function with example usage: test_kafka_stream_dataset() without return types