def METHOD_NAME(user_token: model.UserToken, note: str) -> None:
    assert user_token
    note = note.strip() if note is not None else ""
    note = None if len(note) == 0 else note
    if util.value_exceeds_column_size(note, model.UserToken.note):
        raise InvalidNoteError("Note is too long.")
    user_token.note = note
    update_user_token_edit_time(user_token)