code: def test_kafka_group_io_dataset_resume_primary_cg_new_topic():
      """Test the functionality of the KafkaGroupIODataset when the
      consumer group is yet to catch up with the newly added messages only
      (Instead of reading from the beginning) from the new topic.
      """
      import tensorflow_io.kafka as kafka_io
  
      # Write new messages to the topic
      for i in range(10, 100):
          message = f"D{i}"
          kafka_io.write_kafka(message=message, topic="key-test")
      # Read only the newly sent 90 messages
      dataset = tfio.experimental.streaming.KafkaGroupIODataset(
          topics=["key-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)
          == sorted(("D" + str(i)).encode() for i in range(10, 100))
      )
  
imports: import sys
  import time
  import pytest
  import numpy
  import threading
  import tensorflow
  import tensorflow_io
label_desc: Use image node_id 11 for calling a global function with example usage: test_kafka_group_io_dataset_resume_primary_cg_new_topic() without return types