#NEWLINE# def snapshot_and_play_forward( self , simulation , controller , inject_input , wait_time_seconds ) : #NEWLINE# #INDENT# snapshotter = Snapshotter ( simulation , controller ) #NEWLINE# snapshotter . snapshot_controller ( ) #NEWLINE# def play_forward_and_marshal( ) : #NEWLINE# #INDENT# found_events = play_forward ( simulation , inject_input , wait_time_seconds ) #NEWLINE# return [ e . to_json ( ) for e in found_events ] #NEWLINE# #UNINDENT# self . forker . register_task ( 'snapshot_fork_task' , play_forward_and_marshal ) #NEWLINE# unmarshalled_found_events = self . forker . fork ( 'snapshot_fork_task' ) #NEWLINE# found_events = parse ( unmarshalled_found_events ) #NEWLINE# return ( found_events , snapshotter )