#NEWLINE# def _get_plugin_callbacks( self , instance ) : #NEWLINE# #INDENT# 'Finds the event callbacks in a plugin and returns them as a list.\n\n        Keyword arguments:\n            instane -- An instance of plugin\n\n        Returns:\n            list -- A list of dictionaries holding event names and callable\n                    methods.\n        ' #NEWLINE# callbacks = [ ] #NEWLINE# for method in dir ( instance ) : #NEWLINE# #INDENT# method = getattr ( instance , method ) #NEWLINE# if ( callable ( method ) and hasattr ( method , 'events' ) ) : #NEWLINE# #INDENT# callbacks . append ( { #NEWLINE# #INDENT# 'event_names' : method . events , #NEWLINE# 'method' : method , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# #UNINDENT# return callbacks