def _get_plugin_callbacks(self, instance):
        callbacks = []
        for method in dir(instance):
            method = getattr(instance, method)

            if callable(method) and (hasattr(method, 'events')):
                # Since this method has the 'events' attribute assigned,
                # it is registered as a event for Cardinal
                callbacks.append({
                    'event_names': method.events,
                    'method': method
                })

        return callbacks
Finds the event callbacks in a plugin and returns them as a list.
dataset/ETHPy150Open JohnMaguire/Cardinal/cardinal/plugins.py/PluginManager._get_plugin_callbacks