def METHOD_NAME(block):
    """Returns the tokens for the given block as a (possibly empty) tuple."""
    try:
        return block.userData().METHOD_NAME
    except AttributeError:
        # we used to call highlighter.highlighter(block.document()).rehighlight()
        # here, but there is a bug in PyQt-4.9.6 causing QTextBlockUserData to
        # lose its Python attributes. So we only run the highlighter when the
        # previous block's userState() is -1.
        return tuple(state(block).METHOD_NAME(block.text()))