def parse_s3_uri(uri):
if not isinstance(uri, string_types):<EOL><INDENT>return None<EOL><DEDENT>url = urlparse(uri)<EOL>query = parse_qs(url.query)<EOL>if url.scheme == '<STR_LIT>' and url.netloc and url.path:<EOL><INDENT>s3_pointer = {<EOL>'<STR_LIT>': url.netloc,<EOL>'<STR_LIT>': url.path.lstrip('<STR_LIT:/>')<EOL>}<EOL>if '<STR_LIT>' in query and len(query['<STR_LIT>']) == <NUM_LIT:1>:<EOL><INDENT>s3_pointer['<STR_LIT>'] = query['<STR_LIT>'][<NUM_LIT:0>]<EOL><DEDENT>return s3_pointer<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>
Parses a S3 Uri into a dictionary of the Bucket, Key, and VersionId

    :return: a BodyS3Location dict or None if not an S3 Uri
    :rtype: dict