code: def get_chisq_pvalue(f_obs: np.array, f_ref: np.array) -> float:
      """
      Returns the p-value of the Chi-Square, which is the probability of
      obtaining test results at least as extreme as the observed results.
      A small p-value means that the observed results are very unlikely
      under the null hypothesis (i.e. the distributions are the same).
      https://en.wikipedia.org/wiki/Chi-squared_test
  
      :param f_obs: Frequencies of the observed probability distribution.
      :type f_obs: np.array
      :param f_ref: Frequencies of the reference probability distribution.
      :type f_ref: np.array
      :return: The p-value of the Chi-Square test statistic between the
          frequencies of the two probability distributions.
      :rtype: float
      """
      res = scipy.stats.chisquare(f_obs, f_ref)
      pvalue: float = res[1]
      return pvalue
  
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 8 for calling a global function with example usage: get_chisq_pvalue(f_obs, f_ref) and returns: pvalue