def calculate_senate_bop(race, data):
    """
    "total": The total number of seats held by this party.
        Math: Seats held over (below) + seats won tonight
    "needed_for_majority": The number of seats needed to have a majority.
        Math: 51 (majority share) - total.
    "total_pickups": The zero-indexed total number of pickups by this party.
        Math: Add one for each pickup by this party.
    """
    data['total'] += 1
    majority = 51 - data['total']
    if majority < 0:
        majority = 0
    data['needed_for_majority'] = majority

    if race.has_flipped:
        data['total_pickups'] += 1

    return data