def is_valid_patch(xs, ys, patch_size, purple_mask, intensity_threshold,
    threshold=0.5):
    """Deprecated, computes whether patch is valid."""
    print(xs, ys)
    return (purple_mask[xs:xs + patch_size, ys:ys + patch_size] >=
        intensity_threshold).mean() > threshold
