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"))
  
file_path: TTS/TTS/tts/tf/utils/generic_utils.py
imports: import datetime
  import importlib
  import pickle
  import numpy
  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