def _fix_range(self, num, isslice=True):
nrows = self._info['<STR_LIT>']<EOL>if isslice:<EOL><INDENT>if num < <NUM_LIT:0>:<EOL><INDENT>num = nrows + (<NUM_LIT:1>+num)<EOL><DEDENT>elif num > nrows:<EOL><INDENT>num = nrows<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if num < <NUM_LIT:0>:<EOL><INDENT>num = nrows + num<EOL><DEDENT>elif num > (nrows-<NUM_LIT:1>):<EOL><INDENT>num = nrows-<NUM_LIT:1><EOL><DEDENT><DEDENT>return num<EOL>
Ensure the input is within range.

If el=True, then don't treat as a slice element