code: def testRepeatedDatasetRecoversAndCompletes(
      self, num_workers, num_repetitions
  ):
      cluster = data_service_test_base.TestCluster(
          num_workers=num_workers
      )
      ds = dataset_ops.Dataset.range(1000)
      ds = ds.repeat(num_repetitions)
      self.evaluate(
          distributed_save_op.distributed_save(
              ds, self._path, cluster.dispatcher_address()
          )
      )
  
      # Blocks until all workers have streams.
      get_stream_assignments(cluster, num_workers, [self._path])
      cluster.stop_worker(0)
      cluster.restart_dispatcher()
      for worker_idx in range(num_workers):
          cluster.restart_worker(worker_idx)
      self._wait_for_snapshot()
      self.assertTrue(self._snapshot_is_done())
  
      dataset = dataset_ops.Dataset.load(self._path)
      self.assertDatasetProduces(
          dataset,
          list(range(1000)) * num_repetitions,
          assert_items_equal=True,
      )
  
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 21 for calling the SnapshotFtTest obj's underlying member method code with example usage: obj.testRepeatedDatasetRecoversAndCompletes(num_workers, num_repetitions) without return types