code: def testSaveCheckpointingAPI(self):
      dataset = dataset_ops.Dataset.range(40)
      checkpoint_args = {
          "directory": self._checkpoint_prefix,
          "max_to_keep": 50,
      }
      dataset.save(self._save_dir, checkpoint_args=checkpoint_args)
      num_checkpoint_files = len(
          list(os.listdir(self._checkpoint_prefix))
      )
      # By default, we checkpoint every increment. Each checkpoint writes a
      # file containing the data and a file containing the index. There is
      # also an overall checkpoint file. Thus, we expect (2 * 40) + 1 files.
      self.assertEqual(81, num_checkpoint_files)
  
imports: import os
  import shutil
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.data.kernel_tests import checkpoint_test_base
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import combinations
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the SaveCheckpointTest obj's underlying member method code with example usage: obj.testSaveCheckpointingAPI() without return types