'Gets the user state, generally used for syntax highlighting.
:param block: block to access
:return: The block state'

@staticmethod
def get_state(block):

    if (block is None):
        return (-1)
    state = block.userState()
    if (state == (-1)):
        return state
    return (state & 65535)
