code: def _correlation_ratio(categorical, numeric):
      """Computes correlation ratio between a categorical column and numeric column.
  
      Args:
          categorical (Series): A Series of categorical values
          numeric (Series): A Series of numeric values
  
      Returns:
          Correlation Ratio value (float)
      """
      df = pd.concat([categorical, numeric], axis=1)
      n = numeric.shape[0]
      ybar = np.mean(numeric)
  
      # Get average and count for each category level
      agg = df.groupby(categorical.name).agg(["count", "mean"])
  
      # Remove the Multilevel Index
      agg.columns = agg.columns.droplevel(0)
  
      category_variance = (agg["mean"] - ybar) ** 2
      weighted_category_variance = (
          np.sum(np.multiply(agg["count"], category_variance)) / n
      )
  
      total_variance = np.sum((numeric - ybar) ** 2) / n
  
      eta = np.sqrt(weighted_category_variance / total_variance)
  
      return eta
  
imports: import warnings
  import pandas
  import numpy
  from scipy.cluster import hierarchy
  from sklearn.metrics import matthews_corrcoef
  from scipy.stats import chi2_contingency
  import seaborn
  import matplotlib.pyplot
  import plotly.graph_objs
  import plotly.offline
  from data_describe.config._config import get_option
  from data_describe.misc.colors import get_p_RdBl_cmap, mpl_to_plotly_cmap
  from data_describe._widget import BaseWidget
  from data_describe.compat import _is_dataframe, _in_notebook, _requires
  from data_describe.backends import _get_viz_backend, _get_compute_backend
label_desc: Use image node_id 6 for calling a global function with example usage: _correlation_ratio(categorical, numeric) and returns: eta