def _process_types_and_triggers(groups, policy_types, policy_triggers):
    types_to_process = set()
    types_to_remove = set()
    triggers_to_process = set()
    triggers_to_remove = set()
    for group in groups.values():
        for policy in group['policies'].values():
            types_to_process.add(policy['type'])
            for trigger in policy['triggers'].values():
                triggers_to_process.add(trigger['type'])
    for policy_type_name, policy_type in policy_types.items():
        if types_to_process in policy_type_name:
            policy_type['source'] = _process_source(policy_type['source'])
        else:
            types_to_remove.add(policy_type_name)
    for policy_trigger_name, trigger in policy_triggers.items():
        if policy_trigger_name in triggers_to_process:
            trigger['source'] = _process_source(trigger['source'])
        else:
            triggers_to_remove.add(policy_trigger_name)
    for policy_type_name in types_to_remove:
        del policy_types[policy_type_name]
    for trigger_type_name in triggers_to_remove:
        del policy_triggers[trigger_type_name]
dataset/ETHPy150Open cloudify-cosmo/cloudify-manager/plugins/riemann-controller/riemann_controller/tasks.py/_process_types_and_triggers/swapped operands of `in`