code: def test_kafka_group_io_dataset_primary_cg_no_lag():
      """Test the functionality of the KafkaGroupIODataset when the
      consumer group has read all the messages and committed the offsets.
      """
      dataset = tfio.experimental.streaming.KafkaGroupIODataset(
          topics=["key-partition-test"],
          group_id="cgtestprimary",
          servers="localhost:9092",
          configuration=[
              "session.timeout.ms=7000",
              "max.poll.interval.ms=8000",
          ],
      )
      assert np.all(sorted(k.numpy() for (k, _) in dataset) == [])
  
imports: import sys
  import time
  import pytest
  import numpy
  import threading
  import tensorflow
  import tensorflow_io
label_desc: Use image node_id 8 for calling a global function with example usage: test_kafka_group_io_dataset_primary_cg_no_lag() without return types