<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def splitext(filepath):
 """ Like os.path.splitext except splits compound extensions as one long one ('~/.bashrc', '.asciidoc.ext.ps4.42') ('~/.bash_profile', '') """

    exts = getattr(CRE_FILENAME_EXT.search(filepath), 'group', str)()
    return (filepath[:(-len(exts) or None)], exts)