def stop_recording():
global _recording<EOL>if not _recording:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>recorded_events_queue, hooked = _recording<EOL>unhook(hooked)<EOL>return list(recorded_events_queue.queue)<EOL>
Stops the global recording of events and returns a list of the events
captured.