code: def _ema(prices, days=10):
      if len(prices) < days or days < 2:
          return [prices[-1]]
      a = 2.0 / (days + 1)
      kernel = np.ones(days, dtype=float)
      kernel[1:] = 1 - a
      kernel = a * np.cumprod(kernel)
      # The 0.8647 normalizes out that we stop the EMA after a finite number of terms
      return np.convolve(prices[-days:], kernel, mode="valid") / (
          0.8647
      )
  
file_path: bokeh/examples/server/app/ohlc/main.py
imports: import numpy
  from bokeh.driving import count
  from bokeh.layouts import column, gridplot, row
  from bokeh.models import ColumnDataSource, Select, Slider
  from bokeh.plotting import curdoc, figure
label_desc: Use image node_id 3 for calling a global function with example usage: _ema(prices, days) and returns: unknown, list