def METHOD_NAME(self) -> None:
    if get_main_window().tk.call("winfo", "exists", ".choose_line_ending"):
        get_main_window().tk.call("focus", ".choose_line_ending")
        return
    old_value = self._tab.settings.get("line_ending", settings.LineEnding)
    self._tab.settings.set("line_ending", utils.ask_line_ending(old_value))