private static boolean isTrivialReturn(@NotNull PsiElement element) {
        if (element instanceof PsiBreakStatement || element instanceof PsiContinueStatement) return true;
        if (element instanceof PsiYieldStatement yieldStatement) {
          return isTrivialExpression(yieldStatement.getExpression());
        }
        if (element instanceof PsiReturnStatement returnStatement) {
          return isTrivialExpression(returnStatement.getReturnValue());
        }
        return false;
      }
private static boolean isTrivialReturn(@NotNull PsiElement element)