def get_party(self, raw_result, attr='party'):
        party = getattr(raw_result, attr)
        if not party:
            return None

        clean_abbrev = self._clean_party(party)
        if not clean_abbrev:
            return None

        try:
            return self._party_cache[clean_abbrev]
        except __HOLE__:
            try:
                party = Party.objects.get(abbrev=clean_abbrev)
                self._party_cache[clean_abbrev] = party
                return party
            except Party.DoesNotExist:
                logger.error("No party with abbreviation {}".format(clean_abbrev))
                raise
dataset/ETHPy150Open openelections/openelections-core/openelex/us/wa/transform/__init__.py/BaseTransform.get_party