@publisher('model')
def check_extra_cameras():
    if len(pm.ls(type='camera')) > 4:
        raise PublishError('There should be no extra cameras in your scene!')
checking if there are extra cameras
dataset/ETHPy150Open eoyilmaz/anima/anima/env/mayaEnv/publish.py/check_extra_cameras