def _oct_to_dec(ip, check=True):
if check and not is_oct(ip):<EOL><INDENT>raise ValueError('<STR_LIT>' % ip)<EOL><DEDENT>if isinstance(ip, int):<EOL><INDENT>ip = oct(ip)<EOL><DEDENT>return int(str(ip), <NUM_LIT:8>)<EOL>
Octal to decimal conversion.