def METHOD_NAME(self, action):
    """Handle click on a listed branch.
    Try to checkout the new branch and request a restart afterwards."""
    for branch, act in self._acts.items():
        if act == action:
            new_branch = branch
            break
    if not new_branch:
        return
    try:
        vcs.app_repo.checkout(new_branch)
        from widgets.restartmessage import suggest_restart
        suggest_restart(
            _("Successful checkout of branch:") + f"\n{new_branch}")
    except GitError as giterror:
        msgBox = QMessageBox()
        msgBox.setIcon(QMessageBox.Critical)
        msgBox.setText(_("Git Checkout Error"))
        msgBox.setInformativeText(str(giterror))
        msgBox.exec_()
        action.setChecked(False)
        self._acts[vcs.app_repo.current_branch()].setChecked(True)