'Get all the tags for the rooms where the tags have changed since the
given version
Args:
user_id(str): The user to get the tags for.
stream_id(int): The earliest update to get for the user.
Returns:
A deferred dict mapping from room_id strings to lists of tag
strings for all the rooms that changed since the stream_id token.'

@defer.inlineCallbacks
def get_updated_tags(self, user_id, stream_id):

    def get_updated_tags_txn(txn):
        sql = 'SELECT    room_id    from    room_tags_revisions    WHERE    user_id    =    ?    AND    stream_id    >    ?'
        txn.execute(sql, (user_id, stream_id))
        room_ids = [row[0] for row in txn]
        return room_ids
    changed = self._account_data_stream_cache.has_entity_changed(user_id, int(stream_id))
    if (not changed):
        defer.returnValue({})
    room_ids = (yield self.runInteraction('get_updated_tags', get_updated_tags_txn))
    results = {}
    if room_ids:
        tags_by_room = (yield self.get_tags_for_user(user_id))
        for room_id in room_ids:
            results[room_id] = tags_by_room.get(room_id, {})
    defer.returnValue(results)
