def fire_event(name, *args, **kwargs):
 if (name in _events):
  for event in get_events(name):
   result = event(*args, **kwargs)
   if (result is not None):
    args = ((result,) + args[1:])
 return (args and args[0])

def fire_event ( name , * args , ** kwargs ) : if ( name in _events ) : for event in get_events ( name ) : result = event ( * args , ** kwargs ) if ( result is not None ) : args = ( ( result , ) + args [ 1 : ] ) return ( args and args [ 0 ] )
trigger an event with *name* .