code: def load_checkpoints(self, config, checkpoint_path):
      generator = OcclusionAwareGenerator(
          **config["model"]["generator"]["generator_cfg"],
          **config["model"]["common_params"],
          inference=True,
      )
  
      kp_detector = KPDetector(
          **config["model"]["generator"]["kp_detector_cfg"],
          **config["model"]["common_params"],
      )
  
      checkpoint = paddle.load(self.weight_path)
      generator.set_state_dict(checkpoint["generator"])
  
      kp_detector.set_state_dict(checkpoint["kp_detector"])
  
      generator.eval()
      kp_detector.eval()
  
      return generator, kp_detector
  
imports: import os
  import sys
  import math
  import pickle
  import yaml
  import imageio
  import numpy
  from tqdm import tqdm
  from scipy.spatial import ConvexHull
  import cv2
  import paddle
  from ppgan.utils.download import get_path_from_url
  from ppgan.utils.animate import normalize_kp
  from ppgan.modules.keypoint_detector import KPDetector
  from ppgan.models.generators.occlusion_aware import OcclusionAwareGenerator
  from ppgan.faceutils import face_detection
label_desc: Use image node_id 4 for calling the FirstOrderPredictor obj's underlying member method code with example usage: obj.load_checkpoints(config, checkpoint_path) and returns: generator,  kp_detector