def update_reference_map(new_shift, current_shift, client):
    # Delete entries from the map if there is no one supervising this server
    # this shift.
    for server_ip in current_shift.keys():
        if (server_ip not in new_shift.keys()):
            client.call_api(
                'reference_data/maps/rest_api_samples_current_admin_shift/' +
                server_ip + '?value=' + current_shift[server_ip]['value'],
                'DELETE')

    # Update the usenames to reflect the administrators on duty this shift.
    for server_ip in new_shift.keys():
        client.call_api(
            'reference_data/maps/rest_api_samples_current_admin_shift?key=' +
            server_ip + '&value=' + new_shift[server_ip], 'POST')
dataset/ETHPy150Open ibm-security-intelligence/api-samples/reference_data/02_Maps.py/update_reference_map/original