code: def kde(x, y, N):
      xmin, xmax = x.min(), x.max()
      ymin, ymax = y.min(), y.max()
  
      X, Y = np.mgrid[xmin : xmax : N * 1j, ymin : ymax : N * 1j]
      positions = np.vstack([X.ravel(), Y.ravel()])
      values = np.vstack([x, y])
      kernel = gaussian_kde(values)
      Z = np.reshape(kernel(positions).T, X.shape)
  
      return X, Y, Z
  
imports: import numpy
  from scipy.stats import gaussian_kde
  from bokeh.palettes import Blues9
  from bokeh.plotting import figure, show
  from bokeh.sampledata.autompg import autompg
label_desc: Use image node_id 1 for calling a global function with example usage: kde(x, y, N) and returns: X,  Y,  Z