@publisher('rig')
def check_cacheable_attr():
    if not any([root_node.hasAttr('cacheable')
                and root_node.getAttr('cacheable') != '' and
                root_node.getAttr('cacheable') is not None
                for root_node in auxiliary.get_root_nodes()]):
        raise PublishError(
            'Please add <b>cacheable</b> attribute and set it to a '
            '<b>proper name</b>!'
        )
checks if there is at least one cacheable attr
dataset/ETHPy150Open eoyilmaz/anima/anima/env/mayaEnv/publish.py/check_cacheable_attr