code: def update_scatter(frame):
      i, j = frame // 10, frame % 10
      ax.set_title("iter = " + str(i))
      X_tmp = X_list[i] + V_list[i] * j / 10.0
      plt.setp(line, "xdata", X_tmp[:, 0], "ydata", X_tmp[:, 1])
      return line
  
imports: import numpy
  from sko.PSO import PSO
  import matplotlib.pyplot
  from matplotlib.animation import FuncAnimation
label_desc: Use image node_id 2 for calling a global function with example usage: update_scatter(frame) and returns: line