public DiversitySettings getDiversity() {
        if (diversity != null) return diversity;
        return uniquelyInherited(RankProfile::getDiversity, "diversity settings").orElse(null);
    }
Returns whether this profile inherits (directly or indirectly) the given profile name.
config-model/src/main/java/com/yahoo/schema/RankProfile.java