void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { final PyBinaryExpression expression = as(descriptor.getPsiElement(), PyBinaryExpression.class); if (isLogicalAndExpression(expression) && expression.isWritable()) { final PyBinaryExpression rightExpression = as(expression.getRightExpression(), PyBinaryExpression.class); PyBinaryExpression leftExpression = as(expression.getLeftExpression(), PyBinaryExpression.class); if (isLogicalAndExpression(leftExpression)) { final PyExpression nested = myUseRightChildOfLeft ? leftExpression.getRightExpression() : leftExpression.getLeftExpression(); leftExpression = as(nested, PyBinaryExpression.class); } if (isComparisonExpression(leftExpression) && isComparisonExpression(rightExpression)) { applyFix(leftExpression, rightExpression, project); } } }