def required_track_score(
    *,
    confirmed,
    is_switch_candidate,
    weak_reacq_guard,
    acquire_floor=0.08,
    reacquire_floor=0.07,
    switch_floor=0.10,
):
    if not confirmed:
        return float(acquire_floor)

    floor = float(reacquire_floor)
    if weak_reacq_guard:
        floor = max(floor, float(reacquire_floor))
    if is_switch_candidate:
        floor = max(floor, float(switch_floor))
    return float(floor)


def track_passes_score_gate(
    *,
    track_score,
    confirmed,
    is_switch_candidate,
    weak_reacq_guard,
    acquire_floor=0.08,
    reacquire_floor=0.07,
    switch_floor=0.10,
):
    return float(track_score) >= required_track_score(
        confirmed=confirmed,
        is_switch_candidate=is_switch_candidate,
        weak_reacq_guard=weak_reacq_guard,
        acquire_floor=acquire_floor,
        reacquire_floor=reacquire_floor,
        switch_floor=switch_floor,
    )
