def _get_past_translation(word: str, from_lang_code: str, context: str, user: User=None):
    try:
        from_language = Language.find(from_lang_code)
        origin_word = UserWord.find(word, from_language)
        text = Text.query.filter_by(content=context).one()
        query = Bookmark.query.filter_by(origin_id=origin_word.id, text_id=text.id)
        if user:
            query = query.filter_by(user_id=user.id)
        query.order_by(Bookmark.user_id.asc())
        return query.first().translation.word
    except Exception as e:
        print(e)
        return None
def _get_past_translation(word: str, from_lang_code: str, context: str, user: User=None):
    try:
        from_language = Language.find(from_lang_code)
        origin_word = UserWord.find(word, from_language)
        text = Text.query.filter_by(content=context).one()
        query = Bookmark.query.filter_by(origin_id=origin_word.id, text_id=text.id)
        if user:
            query = query.filter_by(user_id=user.id)
        query.order_by(Bookmark.user_id.asc())
        return query.first().translation.word
    except Exception as e:
        print(e)
        return None