def fold(self):
        """Folds the region."""
        start, end = self.get_range()
        TextBlockHelper.set_collapsed(self._trigger, True)
        block = self._trigger.next()
        while block.blockNumber() <= end and block.isValid():
            block.setVisible(False)
            block = block.next()
def fold ( self ) : start , end = self . get_range ( ) TextBlockHelper . set_collapsed ( self . _trigger , True ) block = self . _trigger . next ( ) while block . blockNumber ( ) <= end and block . isValid ( ) : block . setVisible ( False ) block = block . next ( )
Folds the region.