code: def class_imbalance(
      y_true,
      y_pred=None,
      *,
      prot_attr=None,
      priv_group=1,
      sample_weight=None,
  ):
      r"""Compute the class imbalance, :math:`\frac{N_u - N_p}{N_u + N_p}`.
  
      Where :math:`N_u` is the number of samples in the unprivileged group and
      :math:`N_p` is the number of samples in the privileged group.
  
      Args:
          y_true (pandas.Series): Ground truth (correct) target values.
          y_pred (array-like, optional): Estimated targets. Ignored.
          prot_attr (array-like, keyword-only): Protected attribute(s). If
              ``None``, all protected attributes in y_true are used.
          priv_group (scalar): The label of the privileged group.
          sample_weight (array-like, optional): Sample weights.
  
      Returns:
          float: Class imbalance.
      """
      diff = difference(
          num_samples,
          y_true,
          prot_attr=prot_attr,
          priv_group=priv_group,
          sample_weight=sample_weight,
      )
      return diff / num_samples(y_true, sample_weight=sample_weight)
  
imports: from itertools import permutations
  from typing import Union
  import warnings
  import numpy
  import pandas
  from scipy.special import rel_entr
  from sklearn.metrics import make_scorer, recall_score, precision_score
  from sklearn.metrics import multilabel_confusion_matrix
  from sklearn.metrics._classification import _prf_divide, _check_zero_division
  from sklearn.neighbors import NearestNeighbors
  from sklearn.utils import check_X_y
  from aif360.metrics import ot_metric
  from aif360.sklearn.utils import check_inputs, check_groups
  from aif360.detectors.mdss.ScoringFunctions import BerkJones, Bernoulli
  from aif360.detectors.mdss.MDSS import MDSS
label_desc: Use image node_id 23 for calling a global function with example usage: class_imbalance(y_true, y_pred) and returns: unknown