code: 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()
docs: Folds the region.