'Initialize a MixedModuleStore. Here we look into our passed in kwargs which should be a
collection of other modulestore configuration information'

def __init__(self, contentstore, mappings, stores, i18n_service=None, fs_service=None, user_service=None, create_modulestore_instance=None, signal_handler=None, **kwargs):

    super(MixedModuleStore, self).__init__(contentstore, **kwargs)
    if (create_modulestore_instance is None):
        raise ValueError('MixedModuleStore    constructor    must    be    passed    a    create_modulestore_instance    function')
    self.modulestores = []
    self.mappings = {}
    for (course_id, store_name) in mappings.iteritems():
        try:
            self.mappings[CourseKey.from_string(course_id)] = store_name
        except InvalidKeyError:
            try:
                self.mappings[SlashSeparatedCourseKey.from_deprecated_string(course_id)] = store_name
            except InvalidKeyError:
                log.exception('Invalid    MixedModuleStore    configuration.    Unable    to    parse    course_id    %r', course_id)
                continue
    for store_settings in stores:
        key = store_settings['NAME']
        store = create_modulestore_instance(store_settings['ENGINE'], self.contentstore, store_settings.get('DOC_STORE_CONFIG', {}), store_settings.get('OPTIONS', {}), i18n_service=i18n_service, fs_service=fs_service, user_service=user_service, signal_handler=signal_handler)
        for (course_key, store_name) in self.mappings.iteritems():
            if (store_name == key):
                self.mappings[course_key] = store
        self.modulestores.append(store)
