code: def weighted_cost(fp_rate, fn_rate, cm, privileged):
      norm_const = (
          float(fp_rate + fn_rate)
          if (fp_rate != 0 and fn_rate != 0)
          else 1
      )
      return (
          fp_rate
          / norm_const
          * cm.generalized_false_positive_rate(privileged=privileged)
          * (1 - cm.base_rate(privileged=privileged))
      ) + (
          fn_rate
          / norm_const
          * cm.generalized_false_negative_rate(privileged=privileged)
          * cm.base_rate(privileged=privileged)
      )
  
file_path: AIF360/aif360/algorithms/postprocessing/calibrated_eq_odds_postprocessing.py
imports: import numpy
  from aif360.algorithms import Transformer
  from aif360.metrics import ClassificationMetric, utils
label_desc: Use image node_id 1 for calling a global function with example usage: weighted_cost(fp_rate, fn_rate, cm, privileged) and returns: unknown