code: def generalized_fpr(
      y_true,
      probas_pred,
      *,
      pos_label=1,
      sample_weight=None,
      zero_division="warn",
  ):
      r"""Return the ratio of generalized false positives to negative examples in
      the dataset, :math:`GFPR = \tfrac{GFP}{N}`.
  
      Generalized confusion matrix measures such as this are calculated by summing
      the probabilities of the positive class instead of the hard predictions.
  
      Args:
          y_true (array-like): Ground-truth (correct) target values.
          probas_pred (array-like): Probability estimates of the positive class.
          pos_label (scalar, optional): The label of the positive class.
          sample_weight (array-like, optional): Sample weights.
          zero_division ('warn', 0 or 1): Sets the value to return when there is a
              zero division. If set to “warn”, this acts as 0, but warnings are
              also raised.
  
      Returns:
          float: Generalized false positive rate.
      """
      _check_zero_division(zero_division)
      y_true, probas_pred, sample_weight = check_inputs(
          y_true, probas_pred, sample_weight, False
      )
  
      idx = y_true != pos_label
      gfp = np.array([np.dot(probas_pred[idx], sample_weight[idx])])
      neg = np.array([sample_weight[idx].sum()])
      return _prf_divide(
          gfp,
          neg,
          "generalized FPR",
          "negative",
          None,
          ("generalized FPR",),
          zero_division,
      ).item()
  
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 14 for calling a global function with example usage: generalized_fpr(y_true, probas_pred) and returns: _prf_divide