docs: def insert_action(self, action, prev_action):
          """
          Inserts an action to the editor's context menu.
  
          :param action: action to insert
          :param prev_action: the action after which the new action must be
              inserted or the insert index
          """
          if isinstance(prev_action, QtWidgets.QAction):
              index = self._actions.index(prev_action)
          else:
              index = prev_action
          action.setShortcutContext(QtCore.Qt.WidgetShortcut)
          self._actions.insert(index, action)