def positive_instances(Xt, Yt, underlying_label_ids):
    """Find the instances having some particular label ids.
    
    For all labels in `underlying_label_ids`, return the list of instances containing 
    that label as ground-truth.

    Args:
        Xt: The feature matrix of shape N x d, where N is number of instances, d is 
            feature dimension.
        Yt: The label matrix of shape N x L, L is the size of label space.
        underlying_label_ids: The set of target labels.
    
    Returns:
        A list of positive instance ids and their feature vectors.
    """
    row_ids_list = []
    Xt_subsets = []
    for label_id in underlying_label_ids:
        row_ids = Yt.indices[Yt.indptr[label_id] : Yt.indptr[label_id + 1]]
        Xt_subsets.append(Xt[row_ids])
        row_ids_list.append(row_ids)
    return row_ids_list, Xt_subsets