def take_last_relation()

in src/math_verify/grader.py [0:0]


def take_last_relation(expr: And | Relational) -> Relational:
    """Take the last relation from an And expression."""
    if isinstance(expr, And):
        return take_last_relation(expr._unsorted_args[-1])
    return expr