#NEWLINE# def plugins_by_bundle( pm ) : #NEWLINE# #INDENT# '\n    Organize plugins by bundle name.\n\n    Returns a dict where the key is the bundle name and the value is a list\n    of all plugins that are part of that bundle.\n    ' #NEWLINE# bundles = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for plugin in pm . plugins : #NEWLINE# #INDENT# if ( plugin . bundle not in bundles ) : #NEWLINE# #INDENT# bundles [ pm . bundle ] = [ ] #NEWLINE# #UNINDENT# bundles [ plugin . bundle ] . append ( plugin ) #NEWLINE# #UNINDENT# return bundles