'Given an event and context, evaluate the push rules and return
the results
Returns:
dict of user_id -> action'

@defer.inlineCallbacks
def action_for_event_by_user(self, event, context):

    rules_by_user = (yield self._get_rules_for_event(event, context))
    actions_by_user = {}
    user_tuples = [(u, False) for u in rules_by_user]
    filtered_by_user = (yield filter_events_for_clients_context(self.store, user_tuples, [event], {event.event_id: context}))
    room_members = (yield self.store.get_joined_users_from_context(event, context))
    evaluator = PushRuleEvaluatorForEvent(event, len(room_members))
    condition_cache = {}
    for (uid, rules) in rules_by_user.iteritems():
        display_name = None
        profile_info = room_members.get(uid)
        if profile_info:
            display_name = profile_info.display_name
        if (not display_name):
            if ((event.type == EventTypes.Member) and (event.state_key == uid)):
                display_name = event.content.get('displayname', None)
        filtered = filtered_by_user[uid]
        if (len(filtered) == 0):
            continue
        if (filtered[0].sender == uid):
            continue
        for rule in rules:
            if (('enabled' in rule) and (not rule['enabled'])):
                continue
            matches = _condition_checker(evaluator, rule['conditions'], uid, display_name, condition_cache)
            if matches:
                actions = [x for x in rule['actions'] if (x != 'dont_notify')]
                if (actions and ('notify' in actions)):
                    actions_by_user[uid] = actions
                break
    defer.returnValue(actions_by_user)
