private static boolean contextExits(PsiElement context) {
      if (context instanceof PsiBlockStatement blockStatement) {
        final PsiStatement lastStatement = ControlFlowUtils.getLastStatementInBlock(blockStatement.getCodeBlock());
        return statementExits(lastStatement);
      }
      else {
        return statementExits(context);
      }
    }
private static boolean contextExits(PsiElement context)