static @NotNull UnhandledExceptions collect(@NotNull PsiElement element,
                                              @Nullable PsiElement topElement,
                                              boolean includeSelfCalls) {
    @NotNull Predicate<? super PsiCall> callFilter = includeSelfCalls
                                                     ? c -> false
                                                     : expression -> {
                                                       PsiMethod method = expression.resolveMethod();
                                                       if (method == null) return false;
                                                       return method == PsiTreeUtil.getParentOfType(expression, PsiMethod.class);
                                                     };
    return collect(element, topElement, callFilter);
  }
static @NotNull UnhandledExceptions collect(@NotNull PsiElement element,
                                              @Nullable PsiElement topElement,
                                              boolean includeSelfCalls)