code: def testSaveRestoreModifiedDataset(self):
      ckpt_dir = self.get_temp_dir()
      dataset = dataset_ops.Dataset.range(10)
      iterator = iter(dataset)
      ckpt = trackable_utils.Checkpoint(iterator=iterator)
      manager = checkpoint_management.CheckpointManager(
          ckpt, ckpt_dir, max_to_keep=3
      )
  
      for _ in range(5):
          next(iterator)
      manager.save()
  
      # Define a different dataset and try to restore into its iterator.
      dataset = dataset_ops.Dataset.from_tensor_slices([1, 2, 3])
      iterator = iter(dataset)
      ckpt = trackable_utils.Checkpoint(iterator=iterator)
      manager = checkpoint_management.CheckpointManager(
          ckpt, ckpt_dir, max_to_keep=3
      )
      with self.assertRaisesRegex(
          errors.NotFoundError,
          "Make sure the dataset definition has not changed",
      ):
          ckpt.restore(manager.latest_checkpoint)
  
imports: import os
  from absl.testing import parameterized
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.checkpoint import checkpoint_management
  from tensorflow.python.checkpoint import checkpoint_options
  from tensorflow.python.data.experimental.ops import grouping
  from tensorflow.python.data.experimental.ops import interleave_ops
  from tensorflow.python.data.experimental.ops import scan_ops
  from tensorflow.python.data.experimental.ops import take_while_ops
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import options
  from tensorflow.python.eager import test
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import gen_dataset_ops
  from tensorflow.python.ops import io_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import parsing_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import script_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import gfile
label_desc: Use image node_id 15 for calling the CheckpointTest obj's underlying member method code with example usage: obj.testSaveRestoreModifiedDataset() without return types