private RankProfile resolveReferringProfile() {
        SdRankProfileDefinition profileDefinition = PsiTreeUtil.getParentOfType(referringElement, SdRankProfileDefinition.class);
        if (profileDefinition == null) return null;
        if (AST.inherits(profileDefinition).stream().noneMatch(node -> node.getText().equals(referringElement.getText()))) return null;
        return resolveSchema(profileDefinition).rankProfiles().get(profileDefinition.getName());
    }
Returns the profile which inherits the one we're to find the definition of, or null if
referringElement is not the name of an inherited profile.
integration/intellij/src/main/java/ai/vespa/intellij/schema/findUsages/RankProfileDefinitionFinder.java