def get_discussion_id_map(course, user):
 return dict(map(get_discussion_id_map_entry, get_accessible_discussion_xblocks(course, user)))

def get_discussion_id_map ( course , user ) : return dict ( map ( get_discussion_id_map_entry , get_accessible_discussion_xblocks ( course , user ) ) )
transform the list of this courses discussion xblocks into a dictionary of metadata keyed by discussion_id .