code: def on_save_checkpoint(self, checkpoint):
      save_path = (
          Path(self.config.result_path)
          / self.config.exp_name
          / self.config.exp_version
      )
      self.model.save_pretrained(save_path)
      self.model.decoder.tokenizer.save_pretrained(save_path)
  
imports: import math
  import random
  from pathlib import Path
  import numpy
  import lightning.pytorch
  import torch
  from lightning.pytorch.utilities import rank_zero_only
  from torch.nn.utils.rnn import pad_sequence
  from torch.optim.lr_scheduler import LambdaLR
  from torch.utils.data import DataLoader
  from nougat import NougatConfig, NougatModel
  from nougat.metrics import get_metrics
label_desc: Use image node_id 9 for calling the NougatModelPLModule obj's underlying member method code with example usage: obj.on_save_checkpoint(checkpoint) without return types