code: def test_keep_zero(self):
      checkpointer = Checkpointer(
          serialization_dir=self.TEST_DIR, keep_most_recent_by_count=0
      )
      for epochs_completed in range(5):
          state = {
              "epochs_completed": epochs_completed,
              "batches_in_epoch_completed": 0,
          }
          checkpointer.maybe_save_checkpoint(
              FakeTrainer(model_state=state, training_state=state),
              epochs_completed,
              0,
          )
      files = os.listdir(self.TEST_DIR)
      assert not any("model_state_" in x for x in files)
      assert not any("training_state_" in x for x in files)
  
file_path: allennlp/tests/training/checkpointer_test.py
imports: import os
  import time
  from typing import Optional
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.common.params import Params
  from allennlp.training import Checkpointer, Trainer
  from allennlp.training.trainer import TrainerCheckpoint
label_desc: Use image node_id 3 for calling the TestCheckpointer obj's underlying member method code with example usage: obj.test_keep_zero() without return types