code: def testStreamsReassignedAfterDispatcherRestart(self):
      n = 5
      cluster, _ = self.setup(num_workers=n, ds_size=10000)
      get_streams = lambda: cluster.snapshot_streams(self._path)
      while len(get_streams()) != n:
          time.sleep(0.1)
      cluster.restart_dispatcher()
      streams = get_streams()
      while len(streams) != n:
          time.sleep(0.1)
          streams = get_streams()
      self.assertCountEqual(
          [stream.index for stream in streams], range(n)
      )
  
imports: import collections
  import os
  import pathlib
  import shutil
  import tempfile
  import time
  from absl.testing import parameterized
  from tensorflow.python.data.experimental.kernel_tests.service import test_base
  from tensorflow.python.data.experimental.ops import distributed_save_op
  from tensorflow.python.data.experimental.service import _pywrap_snapshot_utils
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import test_mode
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import errors
  from tensorflow.python.platform import test
label_desc: Use image node_id 17 for calling the SnapshotFtTest obj's underlying member method code with example usage: obj.testStreamsReassignedAfterDispatcherRestart() without return types