def _check_relation(self, relation):
if isinstance(relation, bool):<EOL><INDENT>if not relation:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>return True<EOL><DEDENT>if relation.sense in (<EOL>RelationSense.StrictlyGreater, RelationSense.StrictlyLess):<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(relation))<EOL><DEDENT>if relation.expression.offset == -_INF:<EOL><INDENT>if relation.sense == RelationSense.Less:<EOL><INDENT>return True<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>'.format(<EOL>relation))<EOL><DEDENT><DEDENT>elif relation.expression.offset == _INF:<EOL><INDENT>if relation.sense == RelationSense.Greater:<EOL><INDENT>return True<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>'.format(<EOL>relation))<EOL><DEDENT><DEDENT>return False<EOL>
Check whether the given relation is valid.

        Return false normally, or true if the relation is determined to be
        tautologically true. Raises ``ValueError`` if the relation is
        tautologically false. This includes relations given as a ``False`` bool
        value or certain types of relations that have an infinity offset.