<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _draw_messages(self, painter):
 """ Draw messages from all subclass of CheckerMode currently installed on the editor. :type painter: QtGui.QPainter """

        checker_modes = []
        for m in self.editor.modes:
            if isinstance(m, modes.CheckerMode):
                checker_modes.append(m)
        for checker_mode in checker_modes:
            for msg in checker_mode.messages:
                block = msg.block
                color = QtGui.QColor(msg.color)
                brush = QtGui.QBrush(color)
                rect = QtCore.QRect()
                rect.setX(self.sizeHint().width() / 4)
                rect.setY(block.blockNumber() * self.get_marker_height())
                rect.setSize(self.get_marker_size())
                painter.fillRect(rect, brush)