def METHOD_NAME(window: Box) -> bool:
    if co.negative_survival_prob >= 1.0:
        return True
    else:
        is_positive = False
        if co.target_class_ids is not None:
            is_positive = label_source.enough_target_pixels(
                window, co.target_count_threshold, co.target_class_ids)
        if is_positive:
            return True
        keep_negative = np.random.sample() < co.negative_survival_prob
        return keep_negative