PsiElement (@NotNull PsiElement element) { return EP_NAME.getExtensionList().stream() .map(provider -> provider.getAppropriateParentFrom(element)) .filter(Objects::nonNull) .findFirst() .orElse(null); }