code: def update1():
      global data1, ptr1
      data1[:-1] = data1[1:]  # shift data in the array one sample left
      # (see also: np.roll)
      data1[-1] = np.random.normal()
      curve1.setData(data1)
  
      ptr1 += 1
      curve2.setData(data1)
      curve2.setPos(ptr1, 0)
  
imports: from time import perf_counter
  import numpy
  import pyqtgraph
label_desc: Use image node_id 1 for calling a global function with example usage: update1() without return types