'Get the current presence state for multiple users.
Returns:
dict: `user_id` -> `UserPresenceState`'

@defer.inlineCallbacks
def current_state_for_users(self, user_ids):

    states = {user_id: self.user_to_current_state.get(user_id, None) for user_id in user_ids}
    missing = [user_id for (user_id, state) in states.iteritems() if (not state)]
    if missing:
        res = (yield self.store.get_presence_for_users(missing))
        states.update(res)
        missing = [user_id for (user_id, state) in states.iteritems() if (not state)]
        if missing:
            new = {user_id: UserPresenceState.default(user_id) for user_id in missing}
            states.update(new)
            self.user_to_current_state.update(new)
    defer.returnValue(states)
