'Returns the state at the event. i.e. not including said event.'

@defer.inlineCallbacks
def get_state_ids_for_pdu(self, room_id, event_id):

    (yield run_on_reactor())
    state_groups = (yield self.store.get_state_groups_ids(room_id, [event_id]))
    if state_groups:
        (_, state) = state_groups.items().pop()
        results = state
        event = (yield self.store.get_event(event_id))
        if (event and event.is_state()):
            if ('replaces_state' in event.unsigned):
                prev_id = event.unsigned['replaces_state']
                if (prev_id != event.event_id):
                    results[(event.type, event.state_key)] = prev_id
            else:
                results.pop((event.type, event.state_key), None)
        defer.returnValue(results.values())
    else:
        defer.returnValue([])
