def _check_condition(self, name, condition, expected_or_filter, conditional_operator):
    if (condition is not None):
        if (not isinstance(condition, Condition)):
            raise ValueError("'{0}' must be an instance of Condition".format(name))
        if (expected_or_filter or (conditional_operator is not None)):
            raise ValueError('Legacy conditional parameters cannot be used with condition expressions')
    elif (expected_or_filter or (conditional_operator is not None)):
        warnings.warn('Legacy conditional parameters are deprecated in favor of condition expressions')
def _check_condition(self, name, condition, expected_or_filter, conditional_operator):
    if (condition is not None):
        if (not isinstance(condition, Condition)):
            raise ValueError("'{0}' must be an instance of Condition".format(name))
        if (expected_or_filter or (conditional_operator is not None)):
            raise ValueError('Legacy conditional parameters cannot be used with condition expressions')
    elif (expected_or_filter or (conditional_operator is not None)):
        warnings.warn('Legacy conditional parameters are deprecated in favor of condition expressions')