def register_hook(handler):
 name = handler.__name__.split('_')[0]
 HOOK_HANDLERS[name] = handler
 return handler

def register_hook ( handler ) : name = handler . __name__ . split ( '_' ) [ 0 ] HOOK_HANDLERS [ name ] = handler return handler
registers hook handler .