code: def each_iteration(a, b, c, title):
      fig = plt.figure()
      fig.set_size_inches(10, fig.get_figheight(), forward=True)
      plt.plot(a)
      plt.plot(b)
      plt.plot(c)
      plt.title(str(title))
      plt.legend(["MU", "HALS", "Exact HALS"], loc="upper left")
  
file_path: tensorly/examples/decomposition/plot_nn_cp_hals.py
imports: import numpy
  import tensorly
  from tensorly.decomposition import non_negative_parafac, non_negative_parafac_hals
  from tensorly.decomposition._cp import initialize_cp
  from tensorly.cp_tensor import CPTensor
  import time
  from copy import deepcopy
  from tensorly.metrics.regression import RMSE
  import matplotlib.pyplot
label_desc: Use image node_id 1 for calling a global function with example usage: each_iteration(a, b, c, title) without return types