code: def save_checkpoint(
      model, optimizer, current_step, epoch, r, output_path, **kwargs
  ):
      state = {
          "model": model.weights,
          "optimizer": optimizer,
          "step": current_step,
          "epoch": epoch,
          "date": datetime.date.today().strftime("%B %d, %Y"),
          "r": r,
      }
      state.update(kwargs)
      pickle.dump(state, open(output_path, "wb"))
  
imports: import pickle
  import datetime
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: save_checkpoint(model, optimizer, current_step, epoch, r, output_path) without return types