def splitext(path):<EOL>
base, ext = posixpath.splitext(path)<EOL>if base.lower().endswith('<STR_LIT>'):<EOL><INDENT>ext = base[-<NUM_LIT:4>:] + ext<EOL>base = base[:-<NUM_LIT:4>]<EOL><DEDENT>return base, ext<EOL>
Like os.path.splitext, but take off .tar too