code: def save_best_model(
      target_loss,
      best_loss,
      model,
      optimizer,
      scheduler,
      model_disc,
      optimizer_disc,
      scheduler_disc,
      current_step,
      epoch,
      output_folder,
      **kwargs,
  ):
      if target_loss < best_loss:
          file_name = "best_model.pth.tar"
          checkpoint_path = os.path.join(output_folder, file_name)
          print(" > BEST MODEL : {}".format(checkpoint_path))
          save_model(
              model,
              optimizer,
              scheduler,
              model_disc,
              optimizer_disc,
              scheduler_disc,
              current_step,
              epoch,
              checkpoint_path,
              model_loss=target_loss,
              **kwargs,
          )
          best_loss = target_loss
      return best_loss
  
file_path: TTS/TTS/vocoder/utils/io.py
imports: import os
  import torch
  import datetime
  import pickle
  from TTS.utils.io import RenamingUnpickler
label_desc: Use image node_id 4 for calling a global function with example usage: save_best_model(target_loss, best_loss, model, optimizer, scheduler, model_disc, optimizer_disc, scheduler_disc, current_step, epoch, output_folder) and returns: best_loss