def generate_unmasking_restrict(unmasks): return generate_collapsed_restriction(unmasks)
def generate_masking_restrict(masks): # if it's masked, it's not a match return generate_collapsed_restriction(masks, negate=True)