def get_actions_used(parse, first = True):
actions = set()
if "symbol_type" in parse and parse["symbol_type"] in ("event",):
actions.add(parse['symbol'])
#print("EVENT USED: {}".format(causal_tree['symbol']))
if "children" in parse:
for child in parse['children']:
actions.update(get_actions_used(child, False))
return actions
评论列表
文章目录