class_docstr: TestCallback
code: def test_modelcheckpoint(self):
      trainer_control = TrainerControl()
      modelcheckpoint_callback = ModelCheckpointCallback(
          trainer_control, every_n_epoch=5
      )
      epoch_status = []
      for epoch in range(11):
          modelcheckpoint_callback.on_epoch_end(epoch)
          epoch_status.append(
              modelcheckpoint_callback.trainercontrol.should_save
          )
      assert epoch_status == [
          True,
          False,
          False,
          False,
          False,
          True,
          False,
          False,
          False,
          False,
          True,
      ]
  
      modelcheckpoint_callback = ModelCheckpointCallback(
          trainer_control, every_n_iteration=5
      )
      iteration_status = []
      for _ in range(11):
          batch_data = (None, None)
          modelcheckpoint_callback.on_batch_end(batch_data)
          iteration_status.append(
              modelcheckpoint_callback.trainercontrol.should_save
          )
      assert iteration_status == [
          True,
          False,
          False,
          False,
          False,
          True,
          False,
          False,
          False,
          False,
          True,
      ]
  
file_path: towhee/tests/unittests/trainer/test_callback.py
imports: import unittest
  from typing import Dict, Tuple
  from tqdm import tqdm
  from towhee.trainer.callback import TrainerControl, Callback, CallbackList, EarlyStoppingCallback, ModelCheckpointCallback, TensorBoardCallBack, PrintCallBack, ProgressBarCallBack
label_desc: Use image node_id 5 for calling the TestCallback obj's underlying member method code with example usage: obj.test_modelcheckpoint() without return types