code: def callbacks(cls, eventType=None):
          
          key = '_{0}__callbacks'.format(cls.__name__)
          try:
              callbacks = getattr(cls, key)
          except AttributeError:
              callbacks = {}
              setattr(cls, key, callbacks)
  
          return callbacks.get(eventType, []) if eventType is not None else callbacks
docs: Returns a list of callback methods that can be invoked whenever an event is processed.
  
          :return: {subclass of <Event>: <list>, ..}