def _superset_filter(occ_superset, size_superset, dur_superset, size_subset,
    spectrum, ns_signatures=None, k_superset_filtering=0, min_spikes=2):
    """
    perform superset filtering
    (see pattern_set_reduction)
    """
    if ns_signatures is None:
        ns_signatures = []
    size_diff = size_superset - size_subset + k_superset_filtering
    if spectrum == '#':
        signature_to_test = size_diff, occ_superset
    else:
        signature_to_test = size_diff, occ_superset, dur_superset
    reject_superset = (size_diff < min_spikes or signature_to_test in
        ns_signatures)
    return reject_superset
