import pickle


def load_model(file):
    """
    load (unpickle) a saved model

    Parameters
    ----------
    file : `string'
        file name

    Returns
    -------
        a :class:`yadll.model.Model`

    Examples
    --------

    >>> my_model = load_model('my_best_model.ym')

    """
    with open(file, 'rb') as f:
        model = pickle.load(f)
    return model