code: def test_resume_checkpoint():
      with TemporaryDirectory() as tmpdir:
          model_prefix = "test_net"
          file_path = os.path.join(tmpdir, model_prefix)
          test_data = _get_test_data()
  
          net = _get_test_network()
          ce_loss = loss.SoftmaxCrossEntropyLoss()
          acc = mx.gluon.metric.Accuracy()
          est = estimator.Estimator(
              net, loss=ce_loss, train_metrics=acc
          )
          checkpoint_handler = event_handler.CheckpointHandler(
              model_dir=tmpdir,
              model_prefix=model_prefix,
              monitor=acc,
              max_checkpoints=1,
          )
          est.fit(
              test_data, event_handlers=[checkpoint_handler], epochs=2
          )
          assert os.path.isfile(file_path + "-epoch1batch8.params")
          assert os.path.isfile(file_path + "-epoch1batch8.states")
          checkpoint_handler = event_handler.CheckpointHandler(
              model_dir=tmpdir,
              model_prefix=model_prefix,
              monitor=acc,
              max_checkpoints=1,
              resume_from_checkpoint=True,
          )
          est.fit(
              test_data, event_handlers=[checkpoint_handler], epochs=5
          )
          # should only continue to train 3 epochs and last checkpoint file is epoch4
          assert est.max_epoch == 3
          assert os.path.isfile(file_path + "-epoch4batch20.states")
  
imports: import os
  import logging
  import sys
  import re
  import mxnet
  from common import TemporaryDirectory
  from mxnet import np
  from mxnet.gluon import nn, loss
  from mxnet.gluon.contrib.estimator import estimator, event_handler
  from mxnet.gluon.contrib.estimator.event_handler import LoggingHandler
  from mxnet.gluon.contrib.estimator.event_handler import ValidationHandler
  from mxnet.gluon.contrib.estimator import EpochEnd
  from mxnet.gluon.data.dataset import Dataset
label_desc: Use image node_id 5 for calling a global function with example usage: test_resume_checkpoint() without return types