def annotate_mapper(**decargs):
def decorator(func):<EOL><INDENT>"""<STR_LIT>"""<EOL>def wrapper(event, *args, **kwargs):<EOL><INDENT>"""<STR_LIT>"""<EOL>funcname = "<STR_LIT::>".join([func.__module__, func.__name__])<EOL>enter_ts = time.time()<EOL>out = func(event, *args, **kwargs)<EOL>enter_key = funcname + "<STR_LIT>"<EOL>out = annotate_event(out, enter_key, ts=enter_ts, **decargs)<EOL>exit_key = funcname + "<STR_LIT>"<EOL>out = annotate_event(out, exit_key, ts=time.time(), **decargs)<EOL>return out<EOL><DEDENT>return wrapper<EOL><DEDENT>return decorator<EOL>
Add input and output watermarks to processed events.