private static @Nullable SpeedSearchObjectWithWeight find(@NotNull PsiElement element,
                                                            @NotNull List<? extends SpeedSearchObjectWithWeight> objects,
                                                            @NotNull BiPredicate<? super PsiElement, ? super TreePath> predicate) {
    return ContainerUtil.find(objects, object -> predicate.test(element, ObjectUtils.tryCast(object.node, TreePath.class)));
  }
private static @Nullable SpeedSearchObjectWithWeight find(@NotNull PsiElement element,
                                                            @NotNull List<? extends SpeedSearchObjectWithWeight> objects,
                                                            @NotNull BiPredicate<? super PsiElement, ? super TreePath> predicate)