code: def taylor(fx, xs, order, x_range=(0, 1), n=200):
      x0, x1 = x_range
      x = np.linspace(float(x0), float(x1), n)
  
      fy = sy.lambdify(xs, fx, modules=["numpy"])(x)
      tx = fx.series(xs, n=order).removeO()
  
      if tx.is_Number:
          ty = np.zeros_like(x)
          ty.fill(float(tx))
      else:
          ty = sy.lambdify(xs, tx, modules=["numpy"])(x)
  
      return x, fy, ty
  
file_path: bokeh/examples/server/app/taylor.py
imports: import numpy
  import sympy
  from bokeh.core.properties import value
  from bokeh.io import curdoc
  from bokeh.layouts import column
  from bokeh.models import ColumnDataSource, Legend, LegendItem, PreText, Slider, TextInput
  from bokeh.plotting import figure
label_desc: Use image node_id 1 for calling a global function with example usage: taylor(fx, xs, order, x_range, n) and returns: x,  fy,  ty