def _get_last_lobbyist_data(self, lobbyist, data):
        try:
            last_lobbyist_data = self._get_latest_lobbyist_data(lobbyist)
        except __HOLE__:
            last_lobbyist_data = None
        if last_lobbyist_data is not None:
            for key in self._get_data_keys():
                if data[key] != getattr(last_lobbyist_data, key):
                    last_lobbyist_data = None
                    break
        if last_lobbyist_data is not None:
            represent_ids = sorted(data['represents'], key=lambda represent: represent.id)
            last_represent_ids = sorted(last_lobbyist_data.represents.all(), key=lambda represent: represent.id)
            if represent_ids != last_represent_ids:
                last_lobbyist_data = None
        return last_lobbyist_data
dataset/ETHPy150Open ofri/Open-Knesset/lobbyists/scrapers/lobbyist.py/LobbyistScraperDictStorage._get_last_lobbyist_data