code: def kullback_leibler_divergence(p, q):
      p = np.asarray(p)
      q = np.asarray(q)
      filt = np.logical_and(p != 0, q != 0)
      return np.sum(p[filt] * np.log2(p[filt] / q[filt]))
  
file_path: scikit-image/doc/examples/features_detection/plot_local_binary_pattern.py
imports: import numpy
  import matplotlib.pyplot
  from skimage.transform import rotate
  from skimage.feature import local_binary_pattern
  from skimage import data
  from skimage.color import label2rgb
label_desc: Use image node_id 6 for calling a global function with example usage: kullback_leibler_divergence(p, q) and returns: np