def METHOD_NAME(
    expression: Expression, variables: TGroupedExpressions
) -> Optional[Expression]:
    """If leaf is a variable other than _this, add the expression to variables and return None."""
    assert len(expression.args) == 2
    left, right = expression.args
    left_var = get_variable(left)
    right_var = get_variable(right)
    if is_this(left_var) or is_this(right_var):
        return expression
    # We only extract by the right variable first to handle In properly.
    if right_var is not None:
        variables[right_var].append(expression)
        return None
    elif left_var is not None:
        variables[left_var].append(expression)
        return None
    return expression