def bool_cmp(value1, value2):
    """
    Compare two boolean constants.

    Args:
        value1: The first BooleanConstant instance
        value2: The second BooleanConstant instance

    Returns:
        <0, 0, or >0 depending on whether the first arg is less, equal or
        greater than the second
    """

    # unwrap from _Constant instances
    value1 = value1.value
    value2 = value2.value

    if (value1 and value2) or (not value1 and not value2):
        result = 0

    # Let's say... True < False?
    elif value1:
        result = -1

    else:
        result = 1

    return result