code: def loadCheckpoint(self):
      opts = self.opts
      previous_checkpoint = opts["temp_var"]["checkpoint_model"]
      pretrained_model = opts["temp_var"]["pretrained_model"]
      num_xpus = opts["distributed"]["num_xpus"]
      if previous_checkpoint is not None:
          if os.path.exists(previous_checkpoint):
              log.info(
                  "Load previous checkpoint:{}".format(
                      previous_checkpoint
                  )
              )
              (
                  start_epoch,
                  prev_checkpointed_lr,
                  _best_metric,
              ) = checkpoint.initialize_params_from_file(
                  model=self.train_model,
                  weights_file=previous_checkpoint,
                  num_xpus=num_xpus,
                  opts=opts,
                  broadcast_computed_param=True,
                  reset_epoch=False,
              )
      elif pretrained_model is not None and os.path.exists(
          pretrained_model
      ):
          log.info("Load pretrained model: {}".format(pretrained_model))
          (
              start_epoch,
              prev_checkpointed_lr,
              best_metric,
          ) = checkpoint.initialize_params_from_file(
              model=self.train_model,
              weights_file=pretrained_model,
              num_xpus=num_xpus,
              opts=opts,
              broadcast_computed_param=True,
              reset_epoch=opts["model_param"]["reset_epoch"],
          )
  
      data_parallel_model.FinalizeAfterCheckpoint(self.train_model)
  
imports: from abc import abstractmethod
  from caffe2.python import workspace
  from caffe2.python import timeout_guard
  from caffe2.python import data_parallel_model
  from .None import checkpoint
  from .None import ModuleRegister
  from .None import module_map
  import os
  import inspect
  import time
  import logging
label_desc: Use image node_id 34 for calling the AnyExpTrainer obj's underlying member method code with example usage: obj.loadCheckpoint() without return types