@staticmethod
def set_fold_trigger(block, val):
    """
        Set the block fold trigger flag (True means the block is a fold
        trigger).

        :param block: block to set
        :param val: value to set
        """
    if block is None:
        return
    state = block.userState()
    if state == -1:
        state = 0
    state &= 2080374783
    state |= int(val) << 26
    block.setUserState(state)
