def METHOD_NAME(self, entry):
    with Session() as session:
        stored_entry = self._entry_query(session, entry)
        if stored_entry:
            # Refresh all the fields if we already have this entry
            logger.debug('refreshing entry {}', entry)
            stored_entry.entry = entry
        else:
            logger.debug('adding entry {} to list {}', entry, self._db_list(session).name)
            stored_entry = db.PendingListEntry(
                entry=entry, pending_list_id=self._db_list(session).id
            )
        session.METHOD_NAME(stored_entry)