class_docstr: A generic moment for parity in utilities (or costs) under classification.
  
  This serves as the base class for :class:`DemographicParity`,
  :class:`EqualizedOdds`, and others. All subclasses can be used as
  difference-based constraints or ratio-based constraints.
  Refer to the :ref:`user guide <constraints_binary_classification>` for
  more information and example usage.
  
  Constraints compare the group-level mean utility for each group with the
  overall mean utility (unless further events are specified, e.g., in
  equalized odds).
  Constraint violation for difference-based constraints starts if the
  difference between a group and the overall population with regard to a
  utility exceeds `difference_bound`. For ratio-based constraints, the ratio
  between the group-level and overall mean utility needs to be bounded
  between `ratio_bound` and its inverse (plus an additional additive
  `ratio_bound_slack`).
  
  The `index` field is a :class:`pandas:pandas.MultiIndex` corresponding to
  the constraint IDs.
  It is an index of various DataFrame and Series objects that are either
  required as arguments or returned by several of the methods of the
  `UtilityParity` class. It is the Cartesian product of:
  
  - The unique events defining the particular moment object
  - The unique values of the sensitive feature
  - The characters `+` and `-`, corresponding to the Lagrange multipliers
    for positive and negative violations of the constraint
  
  Read more in the :ref:`User Guide <constraints_binary_classification>`.
  
  Parameters
  ----------
  difference_bound : float
      The constraints' difference bound for constraints that are expressed
      as differences, also referred to as :math:`\\epsilon` in documentation.
      If `ratio_bound` is used then `difference_bound` needs to be None.
      If neither `ratio_bound` nor `difference_bound` are set then a default
      difference bound of 0.01 is used for backwards compatibility.
      Default None.
  ratio_bound : float
      The constraints' ratio bound for constraints that are expressed as
      ratios. The specified value needs to be in (0,1].
      If `difference_bound` is used then `ratio_bound` needs to be None.
      Default None.
  ratio_bound_slack : float
      The constraints' ratio bound slack for constraints that are
      expressed as ratios, also referred to as :math:`\\epsilon` in
      documentation.
      `ratio_bound_slack` is ignored if `ratio_bound` is not specified.
      Default 0.0
class_docstr_tok: ["A","generic","moment","for","parity","in","utilities","(","or","costs",")","under","classification",".","This","serves","as","the","base","class","for",":","class",":","`","DemographicParity","`",",",":","class",":","`","EqualizedOdds","`",",","and","others",".","All","subclasses","can","be","used","as","difference-based","constraints","or","ratio-based","constraints",".","Refer","to","the",":","ref",":","`","user","guide","<","constraints_binary_classification",">","`","for","more","information","and","example","usage",".","Constraints","compare","the","group-level","mean","utility","for","each","group","with","the","overall","mean","utility","(","unless","further","events","are","specified",",","e.g.",",","in","equalized","odds",")",".","Constraint","violation","for","difference-based","constraints","starts","if","the","difference","between","a","group","and","the","overall","population","with","regard","to","a","utility","exceeds","`","difference_bound","`",".","For","ratio-based","constraints",",","the","ratio","between","the","group-level","and","overall","mean","utility","needs","to","be","bounded","between","`","ratio_bound","`","and","its","inverse","(","plus","an","additional","additive","`","ratio_bound_slack","`",")",".","The","`","index","`","field","is","a",":","class",":","`","pandas",":","pandas.MultiIndex","`","corresponding","to","the","constraint","IDs",".","It","is","an","index","of","various","DataFrame","and","Series","objects","that","are","either","required","as","arguments","or","returned","by","several","of","the","methods","of","the","`","UtilityParity","`","class",".","It","is","the","Cartesian","product","of",":","-","The","unique","events","defining","the","particular","moment","object","-","The","unique","values","of","the","sensitive","feature","-","The","characters","`","+","`","and","`","-","`",",","corresponding","to","the","Lagrange","multipliers","for","positive","and","negative","violations","of","the","constraint","Read","more","in","the",":","ref",":","`","User","Guide","<","constraints_binary_classification",">","`",".","Parameters","--","--","--","--","--","difference_bound",":","float","The","constraints","'","difference","bound","for","constraints","that","are","expressed","as","differences",",","also","referred","to","as",":","math",":","`","\\\\epsilon","`","in","documentation",".","If","`","ratio_bound","`","is","used","then","`","difference_bound","`","needs","to","be","None",".","If","neither","`","ratio_bound","`","nor","`","difference_bound","`","are","set","then","a","default","difference","bound","of","0.01","is","used","for","backwards","compatibility",".","Default","None",".","ratio_bound",":","float","The","constraints","'","ratio","bound","for","constraints","that","are","expressed","as","ratios",".","The","specified","value","needs","to","be","in","(","0,1","]",".","If","`","difference_bound","`","is","used","then","`","ratio_bound","`","needs","to","be","None",".","Default","None",".","ratio_bound_slack",":","float","The","constraints","'","ratio","bound","slack","for","constraints","that","are","expressed","as","ratios",",","also","referred","to","as",":","math",":","`","\\\\epsilon","`","in","documentation",".","`","ratio_bound_slack","`","is","ignored","if","`","ratio_bound","`","is","not","specified",".","Default","0.0"]
docstr: Return bound vector.
  
  Returns
  -------
  pandas.Series
      a vector of bound values corresponding to all constraints
docstr_tok: ["Return","bound","vector",".","Returns","--","--","--","-","pandas.Series","a","vector","of","bound","values","corresponding","to","all","constraints"]
code: def bound(self):
      """Return bound vector.
  
      Returns
      -------
      pandas.Series
          a vector of bound values corresponding to all constraints
  
      """
      return pd.Series(self.eps, index=self.index)
  
imports: import numpy
  import pandas
  from fairlearn.utils._input_validation import _MESSAGE_RATIO_NOT_IN_RANGE, _validate_and_reformat_input
  from .error_rate import ErrorRate
  from .moment import _ALL, _EVENT, _GROUP_ID, _LABEL, _SIGN, ClassificationMoment
label_desc: Use image node_id 5 for calling the UtilityParity obj's underlying member method code with example usage: obj.bound() and returns: pd