resolve_promises_dict = function (d) {
        /**
         * Resolve a promiseful dictionary.
         * Returns a single Promise.
         */
        var keys = Object.keys(d);
        var values = [];
        keys.forEach(function (key) {
            values.push(d[key]);
        });
        return Promise.all(values).then(function (v) {
            d = {};
            for (var i = 0; i < keys.length; i++) {
                d[keys[i]] = v[i];
            }
            return d;
        });
    }
Tries to load a class

Tries to load a class from a module using require.js, if a module
is specified, otherwise tries to load a class from the global
registry, if the global registry is provided.