code: def get_js_distance(obs: np.array, ref: np.array) -> float:
      """
      Returns the Jenson-Shannon Distance, a measure that is the
      symmetrized and smoothed version of the KL divergence.
      https://en.wikipedia.org/wiki/Jensen%E2%80%93Shannon_divergence
  
      :param obs: The observed probability distribution.
      :type obs: np.array
      :param ref: The reference probability distribution.
      :type ref: np.array
      :return: The JS Distance between the two probability distributions.
      :rtype: float
      """
      avg = (obs + ref) / 2
      divergence = (
          scipy.stats.entropy(obs, avg) + scipy.stats.entropy(ref, avg)
      ) / 2
      distance = np.sqrt(divergence)
      return distance
  
file_path: responsible-ai-toolbox/responsibleai/responsibleai/databalanceanalysis/distribution_balance_measures.py
imports: from typing import Callable, Dict, List
  import numpy
  import pandas
  import scipy
  from responsibleai.databalanceanalysis.balance_measures import BalanceMeasures
  from responsibleai.databalanceanalysis.constants import Constants, Measures
label_desc: Use image node_id 3 for calling a global function with example usage: get_js_distance(obs, ref) and returns: distance