<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_checked(self, value=True, block_events=False):
 """ This will set whether the button is checked. Setting block_events=True will temporarily disable signals from the button when setting the value. """

        if block_events: self._widget.blockSignals(True)
        self._widget.setChecked(value)
        if block_events: self._widget.blockSignals(False)

        return self