code: def js_divergence(p, q):
      
      m = .5 * (p+q)
      js_div = .5*kl_divergence(p, m) + .5*kl_divergence(q, m)
      return js_div
docs: Compute the Jensen-Shannon Divergence between two discrete distributions.
  
      Parameters
      ----------
      p : np.array
          probability mass array (sums to 1)
      q : np.array
          probability mass array (sums to 1)
  
      Returns
      -------
      js_div : float
          js divergence between the two distrubtions