Returns a dictionary from content ids to subtopic ids.

        Namely, the mapping is ``content_id |--> list of subtopic id``.

        By default (with ``ann_id=None``), subfolders are shown for all
        anonymous users. Optionally, ``ann_id`` can be set to a username,
        which restricts the list to only subfolders owned by that user.

        :param str folder_id: Folder id
        :param str subfolder_id: Subfolder id
        :param str ann_id: Username
        :rtype: ``dict`` of ``content_id |--> [subtopic_id]``

def grouped_items(self, folder_id, subfolder_id, ann_id=None):
        '''Returns a dictionary from content ids to subtopic ids.

        Namely, the mapping is ``content_id |--> list of subtopic id``.

        By default (with ``ann_id=None``), subfolders are shown for all
        anonymous users. Optionally, ``ann_id`` can be set to a username,
        which restricts the list to only subfolders owned by that user.

        :param str folder_id: Folder id
        :param str subfolder_id: Subfolder id
        :param str ann_id: Username
        :rtype: ``dict`` of ``content_id |--> [subtopic_id]``
        '''
        d = defaultdict(list)
        for cid, subid in self.items(folder_id, subfolder_id, ann_id=ann_id):
            d[cid].append(subid)
        return d