async function getOptionalConfigs(pretrained_model_name_or_path, names, options) {
    return Object.fromEntries(await Promise.all(
        Object.keys(names).map(async (name) => {
            const config = await getModelJSON(pretrained_model_name_or_path, names[name], false, options);
            return [name, config];
        })
    ));
}
Helper function to load multiple optional configuration files
@param {string} pretrained_model_name_or_path The path to the directory containing the config file.
@param {Record<string, string>} names The names of the config files to load.
@param {import('./utils/hub.js').PretrainedModelOptions} options Additional options for loading the configs.
@returns {Promise<Record<string, any>>} A Promise that resolves to a dictionary of configuration objects.
@private