private static FileDistributedConstants deriveFileDistributedConstants(Schema schema,
                                                                           Collection<RawRankProfile> rankProfiles,
                                                                           DeployState deployState) {
        Map<Reference, RankProfile.Constant> allFileConstants = new HashMap<>();
        addFileConstants(schema != null ? schema.constants().values() : List.of(),
                         allFileConstants,
                         schema != null ? schema.toString() : "[global]");
        for (var profile : rankProfiles)
            addFileConstants(profile.constants(), allFileConstants, profile.toString());
        return new FileDistributedConstants(deployState.getFileRegistry(), allFileConstants.values());
    }
Creates a rank profile list

@param schema the schema this is a rank profile from
@param attributeFields the attribute fields to create a ranking for
config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java