<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_format_scope(self, fmt):
 """ Opens the format scope. """

        self._prev_fmt = QtGui.QTextCharFormat(fmt)
        self._prev_fmt_closed = False