Hi,
In python, you can add as many attributes to an object as you wish. So to determine if an object is "threatening" simply give it an attribute which says so.
Code:
donut = viz.add('donut.wrl')
donut.isThreatening = False
donut.isDelicious = True
gun = viz.add('gun.wrl')
gun.isThreatening = True
gun.isDelicious = False