How to get loss function history using tf.contrib.opt.ScipyOptimizerInterface

How to get loss function history using tf.contrib.opt.ScipyOptimizerInterface

I need to get the loss history over time to plot it in graph.
Here is my skeleton of code:    
optimizer = tf.contrib.opt.ScipyOptimizerInterface(loss, method='L-BFGS-B', 
options={'maxiter': args.max_iterations, 'disp': 
Read more