<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getInspectorActionById(self, identifier):
 """ Sets the inspector and draw the contents Triggers the corresponding action so that it is checked in the menus. """

        for action in self.inspectorActionGroup.actions():
            if action.data() == identifier:
                return action
        raise KeyError("No action found with ID: {!r}".format(identifier))