public static List<PsiElement> findDocumentChildren(PsiElement element) {
        return new ArrayList<>(PsiTreeUtil.collectElementsOfType(element, new Class[]{SdDocumentStructDefinition.class,
                                                                                      SdDocumentAnnotationDefinition.class,
                                                                                      SdDocumentFieldDefinition.class}));
    }
Returns the first encountered function of the given name in the inheritance hierarchy
of the given profile, or empty if it is not present.

NOTE: Only profiles in the same file is considered
integration/intellij/src/main/java/ai/vespa/intellij/schema/SdUtil.java