def extract(mod, models):
    """ Returns models with mod removed. """
    if mod == {}:
        # No mod to delete, return models as it is.
        return models
    return [model for model in models if model != mod]