private static boolean alwaysReturnsConstant(@NotNull PsiLambdaExpression lambdaExpression) {
    PsiElement body = lambdaExpression.getBody();
    if (body instanceof PsiCodeBlock codeBlock) {
      return alwaysReturnsConstant(codeBlock);
    }
    if (body instanceof PsiExpression expression) {
      return PsiUtil.isConstantExpression(expression);
    }
    return false;
  }
private static boolean alwaysReturnsConstant(@NotNull PsiLambdaExpression lambdaExpression)