def split_tarball_path(path):
lpath = path.lower()<EOL>for e in tarball_endings:<EOL><INDENT>if lpath.endswith(e): return (path, '<STR_LIT>')<EOL>ee = e + '<STR_LIT::>'<EOL>if ee not in lpath: continue<EOL>spl = path.split(ee)<EOL>tarball = spl[<NUM_LIT:0>] + e<EOL>p = ee.join(spl[<NUM_LIT:1>:])<EOL>return (tarball, p)<EOL><DEDENT>return (None, path)<EOL>
split_tarball_path(path) yields a tuple (tarball, p) in which tarball is the path to the tarball
  referenced by path and p is the internal path that followed that tarball. If no tarball is
  included in the path, then (None, path) is returned. If no internal path is found following
  the tarball, then (path, '') is returned.