def _Bisect(self, x, xs, ys):
if x <= xs[<NUM_LIT:0>]:<EOL><INDENT>return ys[<NUM_LIT:0>]<EOL><DEDENT>if x >= xs[-<NUM_LIT:1>]:<EOL><INDENT>return ys[-<NUM_LIT:1>]<EOL><DEDENT>i = bisect.bisect(xs, x)<EOL>frac = <NUM_LIT:1.0> * (x - xs[i - <NUM_LIT:1>]) / (xs[i] - xs[i - <NUM_LIT:1>])<EOL>y = ys[i - <NUM_LIT:1>] + frac * <NUM_LIT:1.0> * (ys[i] - ys[i - <NUM_LIT:1>])<EOL>return y<EOL>
Helper function.