code: def test_kafka_batch_checkpointing_sync_nodes():
      """
      Streams 1 and 3 have different consumer groups, while Stream 2
      has the same group as 1. Hence, Stream 2 does not re-read the
      data that had been finished processing by Stream 1, i.e. it
      picks up from where Stream 1 had left off.
      """
      j1 = random.randint(0, 10000)
      ARGS1 = {
          "bootstrap.servers": "localhost:9092",
          "group.id": "streamz-test%i" % j1,
          "enable.auto.commit": False,
          "auto.offset.reset": "earliest",
      }
      j2 = j1 + 1
      ARGS2 = {
          "bootstrap.servers": "localhost:9092",
          "group.id": "streamz-test%i" % j2,
          "enable.auto.commit": False,
          "auto.offset.reset": "earliest",
      }
      with kafka_service() as kafka:
          kafka, TOPIC = kafka
          for i in range(10):
              kafka.produce(TOPIC, b"value-%d" % i)
          kafka.flush()
          stream1 = Stream.from_kafka_batched(TOPIC, ARGS1)
          out1 = (
              stream1.map(split)
              .filter(lambda x: x[-1] % 2 == 1)
              .sink_to_list()
          )
          stream1.start()
          wait_for(
              lambda: any(out1) and out1[-1][-1] == 9, 10, period=0.2
          )
          stream1.upstream.stopped = True
          stream2 = Stream.from_kafka_batched(TOPIC, ARGS1)
          out2 = (
              stream2.map(split)
              .filter(lambda x: x[-1] % 2 == 1)
              .sink_to_list()
          )
          stream2.start()
          time.sleep(5)
          assert len(out2) == 0
          stream2.upstream.stopped = True
          stream3 = Stream.from_kafka_batched(TOPIC, ARGS2)
          out3 = (
              stream3.map(split)
              .filter(lambda x: x[-1] % 2 == 1)
              .sink_to_list()
          )
          stream3.start()
          wait_for(
              lambda: any(out3) and out3[-1][-1] == 9, 10, period=0.2
          )
          stream3.upstream.stopped = True
  
imports: import asyncio
  import atexit
  from contextlib import contextmanager
  from flaky import flaky
  import os
  import pytest
  import random
  import shlex
  import subprocess
  import time
  from tornado import gen
  from ..core import Stream
  from ..dask import DaskStream
  from streamz.utils_test import gen_test, wait_for, await_for
  from distributed.utils_test import gen_cluster
label_desc: Use image node_id 11 for calling a global function with example usage: test_kafka_batch_checkpointing_sync_nodes() without return types