code: def getPluginActions(self, index):
          
  
          index = self.data["proxies"]["plugin"].mapToSource(
              self.data["proxies"]["plugin"].index(
                  index, 0, QtCore.QModelIndex())).row()
          item = self.data["models"]["item"].items[index]
  
          # Inject reference to the original index
          actions = [
              dict(action, **{"index": index})
              for action in item.actions
          ]
  
          # Context specific actions
          for action in list(actions):
              if action["on"] == "failed" and not item.hasError:
                  actions.remove(action)
              if action["on"] == "succeeded" and not item.succeeded:
                  actions.remove(action)
              if action["on"] == "processed" and not item.processed:
                  actions.remove(action)
              if action["on"] == "notProcessed" and item.processed:
                  actions.remove(action)
  
          # Discard empty categories, separators
          remaining_actions = list()
          index = 0
          try:
              action = actions[index]
          except IndexError:
              pass
          else:
              while action:
                  try:
                      action = actions[index]
                  except IndexError:
                      break
  
                  isempty = False
  
                  if action["__type__"] in ("category", "separator"):
                      try:
                          next_ = actions[index + 1]
                          if next_["__type__"] != "action":
                              isempty = True
                      except IndexError:
                          isempty = True
  
                  if not isempty:
                      remaining_actions.append(action)
  
                  index += 1
  
          return remaining_actions
docs: Return actions from plug-in at `index`
  
          Arguments:
              index (int): Index at which item is located in model