code: def update_data(attrname, old, new):
      # Get the current slider values
      a = amplitude.value
      b = offset.value
      w = phase.value
      k = freq.value
  
      # Generate the new curve
      x = np.linspace(0, 4 * np.pi, N)
      y = a * func(k * x + w) + b
  
      source.data = dict(x=x, y=y)
  
imports: import numpy
  from bokeh.io import curdoc
  from bokeh.layouts import column, row
  from bokeh.models import ColumnDataSource, Slider, TextInput
  from bokeh.plotting import figure
label_desc: Use image node_id 2 for calling a global function with example usage: update_data(attrname, old, new) without return types