from tensorflow.python.platform import gfile

      self.assertTrue(gfile.Exists(s1))
      self.assertTrue(gfile.Exists(save._MetaGraphFilename(s1)))

      # Exercise the third helper.

      # Adding s2 again (but helper is unaware of previous s2)
      s2 = save3.save(sess, os.path.join(save_dir, "s2"))
      self.assertEqual([s2], save3.last_checkpoints)
      # Created by the first helper.
      self.assertTrue(gfile.Exists(s1))
      self.assertTrue(gfile.Exists(save._MetaGraphFilename(s1)))
      # Deleted by the first helper.
      self.assertFalse(gfile.Exists(s3))
      self.assertFalse(gfile.Exists(save._MetaGraphFilename(s3)))
      self.assertTrue(gfile.Exists(s2))
      self.assertTrue(gfile.Exists(save._MetaGraphFilename(s2)))

      # Adding s1 (s3 should not be deleted because helper is unaware of it)
      s1 = save3.save(sess, os.path.join(save_dir, "s1"))
      self.assertEqual([s2, s1], save3.last_checkpoints)
      self.assertFalse(gfile.Exists(s3))
      self.assertFalse(gfile.Exists(save._MetaGraphFilename(s3)))
      self.assertTrue(gfile.Exists(s2))
      self.assertTrue(gfile.Exists(save._MetaGraphFilename(s2)))
      self.assertTrue(gfile.Exists(s1))
      self.assertTrue(gfile.Exists(save._MetaGraphFilename(s1)))

  def testSharded(self):
