<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def trace_engine(engine):
 """Register the event before cursor execute and after cursor execute to the event listner of the engine. """

    event.listen(engine, 'before_cursor_execute', _before_cursor_execute)
    event.listen(engine, 'after_cursor_execute', _after_cursor_execute)