@Contract("null, _, _ -> null")
  public static @Nullable PsiElement skipMatching(@Nullable PsiElement element,
                                                  @NotNull Function<? super @NotNull PsiElement, ? extends @Nullable PsiElement> next,
                                                  @NotNull Predicate<? super @NotNull PsiElement> condition) {
    if (element != null) {
      for (PsiElement e = next.apply(element); e != null; e = next.apply(e)) {
        if (!condition.test(e)) {
          return e;
        }
      }
    }
    return null;
  }
@Contract("null, _, _ -> null")
  public static @Nullable PsiElement skipMatching(@Nullable PsiElement element,
                                                  @NotNull Function<? super @NotNull PsiElement, ? extends @Nullable PsiElement> next,
                                                  @NotNull Predicate<? super @NotNull PsiElement> condition)