def filter_uncontested(votes, threshold):
    """
    Filter elections that are effectively uncontested.
    If `threshold` votes is won by any party,
    the election is considered uncontested.
    """
    effectively_uncontested = votes > threshold
    masked_votes = votes[~effectively_uncontested]
    return masked_votes.dropna()