code: def setAndDrawInspectorById(self, identifier):
          
          self.setInspectorById(identifier)
  
          # Show dialog box if import was unsuccessful.
          regItem = self.inspectorRegItem
          if regItem and not regItem.successfullyImported:
              msg = "Unable to import {} inspector.\n{}".format(regItem.identifier, regItem.exception)
              QtWidgets.QMessageBox.warning(self, "Warning", msg)
              logger.warn(msg)
  
          self.drawInspectorContents(reason=UpdateReason.INSPECTOR_CHANGED)
docs: Sets the inspector and draw the contents.
  
              Does NOT trigger any actions, so the check marks in the menus are not updated. To
              achieve this, the user must update the actions by hand (or call
              getInspectorActionById(identifier).trigger() instead).