code: def save_checkpoint(model, epoch, name="", dataset=""):
      if not os.path.exists("model/{}/".format(dataset)):
          os.makedirs("model/{}/".format(dataset))
      model_path = (
          "model/{}/".format(dataset)
          + name
          + "_e{}.pth.tar".format(epoch)
      )
      state = {"epoch": epoch, "state_dict": model.state_dict()}
      torch.save(state, model_path)
      print("checkpoint saved to {}".format(model_path))
  
file_path: insightface/recognition/idmmd/utils.py
imports: import os
  import numpy
  import torch
  import torch.nn.functional
label_desc: Use image node_id 5 for calling a global function with example usage: save_checkpoint(model, epoch, name, dataset) without return types