def METHOD_NAME(self, name, batch=None):
    """ Retrieve a model from a directory
    Parameters
    ----------
    name : str
        model name
    Returns
    -------
    model
    Raises
    ------
    KeyError
        if there is no model with a given name
    """
    model = self.get(name)
    if model is None:
        raise KeyError(f"Model '{name}' does not exist")
    if isinstance(model, NonInitializedModel):
        with self.lock:
            model = self.get(name)
            if isinstance(model, NonInitializedModel):
                source = self.eval_expr(model.source, batch=batch)
                if source is None:
                    config = self.eval_expr(model.config, batch=batch) or {}
                    model_class = self.eval_expr(model.model_class, batch=batch)
                    model = self.create_model(model_class, config)
                    self.models.update({name: model})
                else:
                    self.import_model(name, source, lock=False)
                    model = self.models[name]
    return model