def METHOD_NAME(ret: StudyDeck) -> None:
    if not ret.name:
        return
    new_selected_deck_id = self.mw.col.decks.by_name(ret.name)["id"]
    if self.selected_deck_id != new_selected_deck_id:
        self.selected_deck_id = new_selected_deck_id
        if func := self.on_deck_changed:
            func(new_selected_deck_id)