def to_dict(self):
if self.subcall is not None:<EOL><INDENT>if isinstance(self.subcall, dict):<EOL><INDENT>subcalls = self.subcall<EOL><DEDENT>else:<EOL><INDENT>subcalls = {}<EOL>for s in self.subcall:<EOL><INDENT>subcalls.update(s.to_dict())<EOL><DEDENT><DEDENT>return {(self.filename, self.line_number, self.name):(self.ncalls, self.nonrecursive_calls, self.own_time_s, self.cummulative_time_s, subcalls)}<EOL><DEDENT>else:<EOL><INDENT>return {(self.filename, self.line_number, self.name):(self.ncalls, self.nonrecursive_calls, self.own_time_s, self.cummulative_time_s)}<EOL><DEDENT>
Convert back to the pstats dictionary representation (used for saving back as pstats binary file)