def METHOD_NAME(self, event):
    selected_rows = {i.row() for i in self.selectedIndexes()}
    breakpoints = [self.breakpoint_mgr.breakpoints[r] for r in selected_rows]
    menu = QMenu("", self)
    if len(breakpoints):
        if len(breakpoints) == 1:
            menu.addAction("Edit breakpoint", lambda: self.edit_breakpoint(breakpoints[0]))
        menu.addAction(
            "Remove breakpoint" + ("s" if len(breakpoints) > 1 else ""),
            lambda: self.remove_breakpoints(breakpoints),
        )
        menu.addSeparator()
    menu.addAction("New breakpoint", self.new_breakpoint)
    menu.exec_(event.globalPos())