def url_split(s3_url):
assert isinstance(s3_url, str)<EOL>match = re_s3_url.match(s3_url)<EOL>if not match:<EOL><INDENT>raise UrlParseError('<STR_LIT>' % s3_url)<EOL><DEDENT>parts = match.groupdict()<EOL>return (parts['<STR_LIT>'], parts['<STR_LIT:key>'])<EOL>
Split S3 URL and return a tuple of (bucket, key).

    S3 URL is expected to be of "s3://<bucket>/<key>" format.