code: def update():
      ## update volume colors
      global phase, sp2, d2
      s = -np.cos(d2 * 2 + phase)
      color = np.empty((len(d2), 4), dtype=np.float32)
      color[:, 3] = fn.clip_array(s * 0.1, 0.0, 1.0)
      color[:, 0] = fn.clip_array(s * 3.0, 0.0, 1.0)
      color[:, 1] = fn.clip_array(s * 1.0, 0.0, 1.0)
      color[:, 2] = fn.clip_array(s**3, 0.0, 1.0)
      sp2.setData(color=color)
      phase -= 0.1
  
      ## update surface positions and colors
      global sp3, d3, pos3
      z = -np.cos(d3 * 2 + phase)
      pos3[:, 2] = z
      color = np.empty((len(d3), 4), dtype=np.float32)
      color[:, 3] = 0.3
      color[:, 0] = np.clip(z * 3.0, 0, 1)
      color[:, 1] = np.clip(z * 1.0, 0, 1)
      color[:, 2] = np.clip(z**3, 0, 1)
      sp3.setData(pos=pos3, color=color)
  
imports: import numpy
  import pyqtgraph
  import pyqtgraph.opengl
  from pyqtgraph import functions
  from pyqtgraph.Qt import QtCore
label_desc: Use image node_id 1 for calling a global function with example usage: update() without return types