public @NotNull BooleanExpressionKind getExpressionKind(PsiExpression expression) {
    if ((expression instanceof PsiPrefixExpression || expression instanceof PsiPolyadicExpression) 
        && containsEscapingPatternVariable(expression)) {
      return BooleanExpressionKind.UNKNOWN;
    }
    if (expression instanceof PsiPrefixExpression || expression instanceof PsiAssignmentExpression) {
      return evaluate(expression) != null ? BooleanExpressionKind.USELESS : BooleanExpressionKind.UNKNOWN;
    }
    if (expression instanceof PsiPolyadicExpression polyadicExpression) {
      return getPolyadicKind(polyadicExpression);
    }
    return BooleanExpressionKind.UNKNOWN;
  }
public @NotNull BooleanExpressionKind getExpressionKind(PsiExpression expression)