code: def splitext(path):
      # type: (str) -> Tuple[str, str]
      
      base, ext = posixpath.splitext(path)
      if base.lower().endswith('.tar'):
          ext = base[-4:] + ext
          base = base[:-4]
      return base, ext
docs: Like os.path.splitext, but take off .tar too