#NEWLINE# def grouped_items( self , folder_id , subfolder_id , ann_id = None ) : #NEWLINE# #INDENT# 'Returns a dictionary from content ids to subtopic ids.\n\n        Namely, the mapping is ``content_id |--> list of subtopic id``.\n\n        By default (with ``ann_id=None``), subfolders are shown for all\n        anonymous users. Optionally, ``ann_id`` can be set to a username,\n        which restricts the list to only subfolders owned by that user.\n\n        :param str folder_id: Folder id\n        :param str subfolder_id: Subfolder id\n        :param str ann_id: Username\n        :rtype: ``dict`` of ``content_id |--> [subtopic_id]``\n        ' #NEWLINE# d = defaultdict ( list ) #NEWLINE# for ( cid , subid ) in self . items ( folder_id , subfolder_id , ann_id = ann_id ) : #NEWLINE# #INDENT# d [ cid ] . append ( self ) #NEWLINE# #UNINDENT# return d