'Called on incoming device list update from federation. Responsible
for parsing the EDU and adding to pending updates list.'

@defer.inlineCallbacks
def incoming_device_list_update(self, origin, edu_content):

    user_id = edu_content.pop('user_id')
    device_id = edu_content.pop('device_id')
    stream_id = str(edu_content.pop('stream_id'))
    prev_ids = edu_content.pop('prev_id', [])
    prev_ids = [str(p) for p in prev_ids]
    if (get_domain_from_id(user_id) != origin):
        logger.warning('Got    device    list    update    edu    for    %r    from    %r', user_id, origin)
        return
    room_ids = (yield self.store.get_rooms_for_user(user_id))
    if (not room_ids):
        return
    self._pending_updates.setdefault(user_id, []).append((device_id, stream_id, prev_ids, edu_content))
    (yield self._handle_device_updates(user_id))
