private boolean isRightSimplified(@NotNull final PyBinaryExpression leftExpression,
                                      @NotNull final PyBinaryExpression rightExpression) {
      final PyExpression leftRight = leftExpression.getRightExpression();
      if (leftRight instanceof PyBinaryExpression &&
          PyTokenTypes.RELATIONAL_OPERATIONS.contains(((PyBinaryExpression)leftRight).getOperator())) {
        if (isRightSimplified((PyBinaryExpression)leftRight, rightExpression)) {
          return true;
        }
      }

      myOperator = leftExpression.getOperator();
      if (PyTokenTypes.RELATIONAL_OPERATIONS.contains(myOperator)) {
        if (leftRight != null) {
          if (leftRight.getText().equals(getLeftExpression(rightExpression, true).getText())) {
            myIsLeft = false;
            myIsRight = true;
            isConstantInTheMiddle = leftRight instanceof PyLiteralExpression;
            return true;
          }

          final PyExpression right = getSmallestRight(rightExpression, true);
          if (right != null && leftRight.getText().equals(right.getText())) {
            myIsLeft = false;
            myIsRight = false;
            isConstantInTheMiddle = leftRight instanceof PyLiteralExpression;
            return true;
          }
        }
      }
      return false;
    }
private boolean isRightSimplified(@NotNull final PyBinaryExpression leftExpression,
                                      @NotNull final PyBinaryExpression rightExpression)