def _get_range_session(self, start=<NUM_LIT:1>, stop=None, raw=True, output=False):
input_hist = self.input_hist_raw if raw else self.input_hist_parsed<EOL>n = len(input_hist)<EOL>if start < <NUM_LIT:0>:<EOL><INDENT>start += n<EOL><DEDENT>if not stop or (stop > n):<EOL><INDENT>stop = n<EOL><DEDENT>elif stop < <NUM_LIT:0>:<EOL><INDENT>stop += n<EOL><DEDENT>for i in range(start, stop):<EOL><INDENT>if output:<EOL><INDENT>line = (input_hist[i], self.output_hist_reprs.get(i))<EOL><DEDENT>else:<EOL><INDENT>line = input_hist[i]<EOL><DEDENT>yield (<NUM_LIT:0>, i, line)<EOL><DEDENT>
Get input and output history from the current session. Called by
        get_range, and takes similar parameters.