private static boolean isDisallowedExitPoint(@Nullable PsiElement element) {
      return element instanceof PyReturnStatement && ((PyReturnStatement)element).getExpression() != null ||
             element instanceof PyYieldExpression;
    }
private static boolean isDisallowedExitPoint(@Nullable PsiElement element)