like np.compress but for lists

    Returns items in item list where the corresponding item in flag list is
    True

    Args:
        item_list (list): list of items to mask
        flag_list (list): list of booleans used as a mask

    Returns:
        list : filtered_items - masked items

def compress(item_list, flag_list):
    """
    like np.compress but for lists

    Returns items in item list where the corresponding item in flag list is
    True

    Args:
        item_list (list): list of items to mask
        flag_list (list): list of booleans used as a mask

    Returns:
        list : filtered_items - masked items
    """
    assert len(item_list) == len(flag_list), (
        'lists should correspond. len(item_list)=%r len(flag_list)=%r' %
        (len(item_list), len(flag_list)))
    filtered_items = list(util_iter.iter_compress(item_list, flag_list))
    return filtered_items