code: def plot_loss_history(history, figsize=(15, 8)):
      
  
      plt.figure(figsize=figsize)
  
      plt.plot(history.history["loss"])
      plt.plot(history.history["val_loss"])
  
      plt.xlabel("# Epochs")
      plt.ylabel("Loss")
      plt.legend(["Training", "Validation"])
      plt.title("Loss over time")
  
      plt.show()
docs: Plots the learning history for a Keras model,
      assuming the validation data was provided to the 'fit' function.
  
      Args:
          history: The return value from the 'fit' function.
          figsize: The size of the plot.