def __setstate__(self, state):
super().__setstate__(state)<EOL>self.input = Socket()<EOL>self.input.buffer = state['<STR_LIT:input>']<EOL>self.output = Socket()<EOL>self.output.buffer = state['<STR_LIT>']<EOL>self.files = []<EOL>for ty, file_or_buffer in state['<STR_LIT>']:<EOL><INDENT>if ty == '<STR_LIT>':<EOL><INDENT>f = Socket()<EOL>f.buffer = file_or_buffer<EOL>self.files.append(f)<EOL><DEDENT>else:<EOL><INDENT>self.files.append(file_or_buffer)<EOL><DEDENT><DEDENT>self.files[<NUM_LIT:0>].peer = self.output<EOL>self.files[<NUM_LIT:1>].peer = self.output<EOL>self.files[<NUM_LIT:2>].peer = self.output<EOL>self._closed_files = state['<STR_LIT>']<EOL>self.input.peer = self.files[<NUM_LIT:0>]<EOL>self._rlimits = state['<STR_LIT>']<EOL>self.procs = state['<STR_LIT>']<EOL>self._current = state['<STR_LIT>']<EOL>self.running = state['<STR_LIT>']<EOL>self.rwait = state['<STR_LIT>']<EOL>self.twait = state['<STR_LIT>']<EOL>self.timers = state['<STR_LIT>']<EOL>self.clocks = state['<STR_LIT>']<EOL>self.syscall_trace = state['<STR_LIT>']<EOL>self.argv = state['<STR_LIT>']<EOL>self.envp = state['<STR_LIT>']<EOL>self.base = state['<STR_LIT>']<EOL>self.elf_bss = state['<STR_LIT>']<EOL>self.end_code = state['<STR_LIT>']<EOL>self.end_data = state['<STR_LIT>']<EOL>self.elf_brk = state['<STR_LIT>']<EOL>self.brk = state['<STR_LIT>']<EOL>self.auxv = state['<STR_LIT>']<EOL>self.program = state['<STR_LIT>']<EOL>self._function_abi = state['<STR_LIT>']<EOL>self._syscall_abi = state['<STR_LIT>']<EOL>self._uname_machine = state['<STR_LIT>']<EOL>if '<STR_LIT>' in state:<EOL><INDENT>self._arm_tls_memory = state['<STR_LIT>']<EOL><DEDENT>for proc in self.procs:<EOL><INDENT>self.forward_events_from(proc)<EOL><DEDENT>
:todo: some asserts
:todo: fix deps? (last line)