'Get all the tags for a user.
Args:
user_id(str): The user to get the tags for.
Returns:
A deferred dict mapping from room_id strings to dicts mapping from
tag strings to tag content.'

@cached()
def get_tags_for_user(self, user_id):

    deferred = self._simple_select_list('room_tags', {'user_id': user_id}, ['room_id', 'tag', 'content'])
    @deferred.addCallback
    def tags_by_room(rows):
        tags_by_room = {}
        for row in rows:
            room_tags = tags_by_room.setdefault(row['room_id'], {})
            room_tags[row['tag']] = json.loads(row['content'])
        return tags_by_room
    return deferred
