docstr: Resume from saved checkpoints
  :param checkpoint_path: Checkpoint path to be resumed
docstr_tok: ["Resume","from","saved","checkpoints",":","param","checkpoint_path",":","Checkpoint","path","to","be","resumed"]
code: def _load_checkpoint(self, checkpoint_path, resume):
      """
      Resume from saved checkpoints
      :param checkpoint_path: Checkpoint path to be resumed
      """
      self.logger_info(
          "Loading checkpoint: {} ...".format(checkpoint_path)
      )
      checkpoint = paddle.load(checkpoint_path)
      self.model.set_state_dict(checkpoint["state_dict"])
      if resume:
          self.global_step = checkpoint["global_step"]
          self.start_epoch = checkpoint["epoch"]
          self.config["lr_scheduler"]["args"][
              "last_epoch"
          ] = self.start_epoch
          # self.scheduler.load_state_dict(checkpoint['scheduler'])
          self.optimizer.set_state_dict(checkpoint["optimizer"])
          if "metrics" in checkpoint:
              self.metrics = checkpoint["metrics"]
          self.logger_info(
              "resume from checkpoint {} (epoch {})".format(
                  checkpoint_path, self.start_epoch
              )
          )
      else:
          self.logger_info(
              "finetune from checkpoint {}".format(checkpoint_path)
          )
  
imports: import os
  import pathlib
  import shutil
  from pprint import pformat
  import anyconfig
  import paddle
  import numpy
  import random
  from paddle.jit import to_static
  from paddle.static import InputSpec
  from utils import setup_logger
label_desc: Use image node_id 9 for calling the BaseTrainer obj's underlying member method code with example usage: obj._load_checkpoint(checkpoint_path, resume) without return types