code: def __kullback_leibler(h1, h2):  # 36.3 us
      """
      The actual KL implementation. @see kullback_leibler() for details.
      Expects the histograms to be of type scipy.ndarray.
      """
      result = h1.astype(scipy.float_)
      mask = h1 != 0
      result[mask] = scipy.multiply(
          h1[mask], scipy.log(h1[mask] / h2[mask])
      )
      return scipy.sum(result)
  
imports: import math
  import scipy
label_desc: Use image node_id 14 for calling a global function with example usage: __kullback_leibler(h1, h2) and returns: scipy