@staticmethod
def get_fold_lvl(block):
    """
        Gets the block fold level.

        :param block: block to access.
        :returns: The block fold level
        """
    if block is None:
        return 0
    state = block.userState()
    if state == -1:
        state = 0
    return (state & 67043328) >> 16
