code: def update():
      # update some items in the "typical" CDS column
      s = slice(100)
      new_x = source.data["x"][s] + np.random.uniform(
          -0.1, 0.1, size=100
      )
      new_y = source.data["y"][s] + np.random.uniform(
          -0.2, 0.2, size=100
      )
      source.patch({"x": [(s, new_x)], "y": [(s, new_y)]})
  
      # update a single point of the 1d multi-line data
      i = np.random.randint(200)
      new_y = source1d.data["ys"][0][i] + (
          0.2 * np.random.random() - 0.1
      )
      source1d.patch({"ys": [([0, i], [new_y])]})
  
      # update five rows of the 2d image data at a time
      s1, s2 = slice(50, 151, 20), slice(None)
      index = [0, s1, s2]
      new_data = np.roll(
          source2d.data["img"][0][s1, s2], 2, axis=1
      ).flatten()
      source2d.patch({"img": [(index, new_data)]})
  
imports: import numpy
  from bokeh.io import curdoc
  from bokeh.layouts import gridplot
  from bokeh.models import ColumnDataSource
  from bokeh.plotting import figure
label_desc: Use image node_id 1 for calling a global function with example usage: update() without return types