def METHOD_NAME(self, disjunction):
    # the sum of all the indicator variable values of disjuncts in the
    # disjunction
    logical_sum = sum(
        value(disj.binary_indicator_var) for disj in disjunction.disjuncts
    )
    # Check that the disjunctions are not being fixed to an infeasible
    # realization.
    if disjunction.xor and not logical_sum == 1:
        # for XOR disjunctions, the sum of all disjunct values should be 1
        raise GDP_Error(
            "Disjunction %s violated. "
            "Expected 1 disjunct to be active, but %s were active."
            % (disjunction.name, logical_sum)
        )
    elif not logical_sum >= 1:
        # for non-XOR disjunctions, the sum of all disjunct values should
        # be at least 1
        raise GDP_Error(
            "Disjunction %s violated. "
            "Expected at least 1 disjunct to be active, "
            "but none were active."
        )
    else:
        # disjunction is in feasible realization. Deactivate it.
        disjunction.deactivate()