code: def test_kafka_io_dataset():
      dataset = tfio.IODataset.from_kafka(
          "test", configuration=["fetch.min.bytes=2"]
      ).batch(2)
      # repeat multiple times will result in the same result
      for _ in range(5):
          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 5 for calling a global function with example usage: test_kafka_io_dataset() without return types