code: def testNestedDataset(self):
      cluster = data_service_test_base.TestCluster(num_workers=1)
      dataset = dataset_ops.Dataset.from_tensor_slices(range(100))
  
      def interleave_fn(x):
          ds = dataset_ops.Dataset.from_tensor_slices(range(x))
  
          def flat_map_fn(y):
              return dataset_ops.Dataset.from_tensor_slices([y])
  
          return ds.flat_map(flat_map_fn)
  
      dataset = dataset.interleave(
          interleave_fn, cycle_length=2, num_parallel_calls=2
      )
  
      self.evaluate(
          distributed_save_op.distributed_save(
              dataset, self._path, cluster.dispatcher_address()
          )
      )
      # Blocks until all workers have streams.
      get_stream_assignments(cluster, 1, [self._path])
      time.sleep(1)
      cluster.stop_worker(0)
      cluster.restart_dispatcher()
      cluster.restart_worker(0)
      self._wait_for_snapshot()
      self.assertTrue(self._snapshot_is_done())
  
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 24 for calling the SnapshotFtTest obj's underlying member method code with example usage: obj.testNestedDataset() and returns: ds, dataset_ops