def _check_result_and_store_references(self, result, results, n, total_runs):
if result[<NUM_LIT:0>] == sigint_handling.SIGINT:<EOL><INDENT>self._stop_iteration = True<EOL>result = result[<NUM_LIT:1>]  <EOL><DEDENT>if result is not None:<EOL><INDENT>if self._wrap_mode == pypetconstants.WRAP_MODE_LOCAL:<EOL><INDENT>self._multiproc_wrapper.store_references(result[<NUM_LIT:2>])<EOL><DEDENT>self._traj._update_run_information(result[<NUM_LIT:1>])<EOL>results.append(result[<NUM_LIT:0>])<EOL>if self._resumable:<EOL><INDENT>self._trigger_result_snapshot(result[<NUM_LIT:0>:<NUM_LIT:2>])<EOL><DEDENT><DEDENT>self._show_progress(n, total_runs)<EOL>n += <NUM_LIT:1><EOL>return n<EOL>
Checks for SIGINT and if reference wrapping and stores references.