def splitext(path):
    base, ext = posixpath.splitext(path)
    if base.lower().endswith('.tar'):
        ext = base[-4:] + ext
        base = base[:-4]
    return base, ext
Like os.path.splitext, but take off .tar too
dataset/ETHPy150Open anzev/hedwig/build/pip/pip/utils/__init__.py/splitext