code: def animate(i):
      thisx = [0, x1[i], x2[i]]
      thisy = [0, y1[i], y2[i]]
  
      history_x = x2[:i]
      history_y = y2[:i]
  
      line.set_data(thisx, thisy)
      trace.set_data(history_x, history_y)
      time_text.set_text(time_template % (i * dt))
      return line, trace, time_text
  
imports: import matplotlib.pyplot
  import numpy
  from numpy import cos, sin
  import matplotlib.animation
label_desc: Use image node_id 2 for calling a global function with example usage: animate(i) and returns: line,  trace,  time_text