'Tries to retrieve a component from the cache, calls `load` to create a new component.'

def load_component(self, component_name, model_dir, model_metadata, **context):

    from rasa_nlu import registry
    from rasa_nlu.model import Metadata
    try:
        (cached_component, cache_key) = self.__get_cached_component(component_name, model_metadata)
        component = registry.load_component_by_name(component_name, model_dir, model_metadata, cached_component, **context)
        if (not cached_component):
            self.__add_to_cache(component, cache_key)
        return component
    except MissingArgumentError as e:
        raise Exception(u"Failed    to    load    component    '{}'.    {}".format(component_name, e))
