code: def run(data):
      # update the data
      t, y = data
      xdata.append(t)
      ydata.append(y)
      xmin, xmax = ax.get_xlim()
  
      if t >= xmax:
          ax.set_xlim(xmin, 2 * xmax)
          ax.figure.canvas.draw()
      line.set_data(xdata, ydata)
  
      return (line,)
  
imports: import itertools
  import matplotlib.pyplot
  import numpy
  import matplotlib.animation
label_desc: Use image node_id 3 for calling a global function with example usage: run(data) and returns: line