def METHOD_NAME(self, session, entry, approved=None):
    query = (
        session.query(db.PendingListEntry)
        .filter(db.PendingListEntry.list_id == self._db_list(session).id)
        .filter(
            or_(
                db.PendingListEntry.title == entry['title'],
                and_(
                    db.PendingListEntry.original_url,
                    db.PendingListEntry.original_url == entry['original_url'],
                ),
            )
        )
    )
    if approved is not None:
        query = query.filter(db.PendingListEntry.approved == approved)
    return query.first()