def WhichParty(s):
    for abbreviation, long_name in party_long_names.items():
        if long_name in s:
            return abbreviation
    return None
If the given string contains a party name, return its abbreviation.
dataset/ETHPy150Open j3camero/canada-election-forecast/riding_forecast.py/WhichParty