'Toggle a fold trigger block (expand or collapse it).
:param block: The QTextBlock to expand/collapse'

def toggle_fold_trigger(self, block):

    if (not TextBlockHelper.is_fold_trigger(block)):
        return
    region = FoldScope(block)
    if region.collapsed:
        region.unfold()
        if (self._mouse_over_line is not None):
            self._decorate_block(*region.get_range())
    else:
        region.fold()
        self._clear_scope_decos()
    self._refresh_editor_and_scrollbars()
    self.trigger_state_changed.emit(region._trigger, region.collapsed)
