def _consolidate_bounds_with_equality_constraints(equality_pc, params):
    """consolidate bounds with equality constraints.

    Check that there are no incompatible bounds on equality constrained parameters and
    set the bounds for equal parameters to the strictest bound encountered on any of
    them.

    Args:
        equality_pc (list): List of constraints of type "equality".
        params (pd.DataFrame): see :ref:`param`.

    Returns:
        pp (pd.DataFrame): Copy of params with stricter bounds.

    """
    pp = params.copy()
    lower = pp["lower_bound"].copy()
    upper = pp["upper_bound"].copy()
    for eq in equality_pc:
        lower.iloc[eq["index"]] = lower.iloc[eq["index"]].max()
        upper.iloc[eq["index"]] = upper.iloc[eq["index"]].min()

    pp["lower_bound"] = lower
    pp["upper_bound"] = upper

    return pp