code: def save_checkpoint(ckpt, is_best, file_dir, file_name="model.ckpt"):
      if not os.path.exists(file_dir):
          os.makedirs(file_dir)
      ckpt_name = "{0}{1}".format(file_dir, file_name)
      torch.save(ckpt, ckpt_name)
      if is_best:
          shutil.copyfile(
              ckpt_name, "{0}{1}".format(file_dir, "best_" + file_name)
          )
  
imports: import math
  import os
  import random
  import sys
  import time
  import warnings
  import numpy
  import numpy
  import shutil
  import logging
  import torch
  import torchvision.transforms
  import torchvision.datasets
  import torch.nn
label_desc: Use image node_id 22 for calling a global function with example usage: save_checkpoint(ckpt, is_best, file_dir, file_name) without return types