def extract_solution(S, model):
    """ Get a list of sets comprising a set packing

    :param S: a weighted :py:class:`~graphilp.imports.ilpsetsystem.ILPSetSystem`
    :param model: a solved Gurobi model for weighted set packing

    :return: a list of sets comprising a set packing
    """
    iterate = list(range(len(S.S)))
    set_cover = [list(S.S.keys())[i] for i in iterate if S.system_variables.X[i] > 0.5]

    return set_cover