code: def save_checkpoints(self, epoch):
      torch.save(
          {"epoch": epoch, "model_state_dict": self.model.state_dict()},
          os.path.join(
              self.checkpoints_path,
              self.model_params_subdir,
              str(epoch) + ".pth",
          ),
      )
      torch.save(
          {"epoch": epoch, "model_state_dict": self.model.state_dict()},
          os.path.join(
              self.checkpoints_path,
              self.model_params_subdir,
              "latest.pth",
          ),
      )
  
      torch.save(
          {
              "epoch": epoch,
              "optimizer_state_dict": self.optimizer.state_dict(),
          },
          os.path.join(
              self.checkpoints_path,
              self.optimizer_params_subdir,
              str(epoch) + ".pth",
          ),
      )
      torch.save(
          {
              "epoch": epoch,
              "optimizer_state_dict": self.optimizer.state_dict(),
          },
          os.path.join(
              self.checkpoints_path,
              self.optimizer_params_subdir,
              "latest.pth",
          ),
      )
  
      torch.save(
          {
              "epoch": epoch,
              "scheduler_state_dict": self.scheduler.state_dict(),
          },
          os.path.join(
              self.checkpoints_path,
              self.scheduler_params_subdir,
              str(epoch) + ".pth",
          ),
      )
      torch.save(
          {
              "epoch": epoch,
              "scheduler_state_dict": self.scheduler.state_dict(),
          },
          os.path.join(
              self.checkpoints_path,
              self.scheduler_params_subdir,
              "latest.pth",
          ),
      )
  
      if self.train_cameras:
          torch.save(
              {
                  "epoch": epoch,
                  "optimizer_cam_state_dict": self.optimizer_cam.state_dict(),
              },
              os.path.join(
                  self.checkpoints_path,
                  self.optimizer_cam_params_subdir,
                  str(epoch) + ".pth",
              ),
          )
          torch.save(
              {
                  "epoch": epoch,
                  "optimizer_cam_state_dict": self.optimizer_cam.state_dict(),
              },
              os.path.join(
                  self.checkpoints_path,
                  self.optimizer_cam_params_subdir,
                  "latest.pth",
              ),
          )
  
          torch.save(
              {
                  "epoch": epoch,
                  "pose_vecs_state_dict": self.pose_vecs.state_dict(),
              },
              os.path.join(
                  self.checkpoints_path,
                  self.cam_params_subdir,
                  str(epoch) + ".pth",
              ),
          )
          torch.save(
              {
                  "epoch": epoch,
                  "pose_vecs_state_dict": self.pose_vecs.state_dict(),
              },
              os.path.join(
                  self.checkpoints_path,
                  self.cam_params_subdir,
                  "latest.pth",
              ),
          )
  
file_path: insightface/reconstruction/PBIDR/code/training/train.py
imports: import os
  from datetime import datetime
  from pyhocon import ConfigFactory
  import sys
  import torch
  import torch.nn
  import utils.general
  import utils.plots
label_desc: Use image node_id 2 for calling the IFTrainRunner obj's underlying member method code with example usage: obj.save_checkpoints(epoch) without return types