code: def save_checkpoint(state, is_best, filename="checkpoint.pth.tar"):
      """Saves checkpoint of plaintext model"""
      # only save from rank 0 process to avoid race condition
      rank = comm.get().get_rank()
      if rank == 0:
          torch.save(state, filename)
          if is_best:
              shutil.copyfile(filename, "model_best.pth.tar")
  
imports: import logging
  import os
  import random
  import shutil
  import tempfile
  import time
  import crypten
  import crypten.communicator
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.optim
  import torch.utils.data
  import torch.utils.data.distributed
  from examples.meters import AverageMeter
  from examples.util import NoopContextManager
  from torchvision import datasets, transforms
label_desc: Use image node_id 8 for calling a global function with example usage: save_checkpoint(state, is_best, filename) without return types