code: def save_model_params(
      is_checkpoint, model, checkpoint_path, epoch, opts, best_metric
  ):
      # best_metric=float('-inf')
      if checkpoint_path is None:
          return None
  
      try:
          save_model_params_blob(
              model, checkpoint_path, epoch, opts, best_metric
          )
      except Exception as e:
          log.warning(
              "Exception from save_model_params {}".format(str(e))
          )
      return checkpoint_path
  
file_path: pytorch/caffe2/contrib/playground/checkpoint.py
imports: import numpy
  import pickle
  from collections import OrderedDict
  from caffe2.proto import caffe2_pb2
  from caffe2.python import workspace, core, scope
  import logging
label_desc: Use image node_id 4 for calling a global function with example usage: save_model_params(is_checkpoint, model, checkpoint_path, epoch, opts, best_metric) and returns: checkpoint_path, None