def get_multipart_md5(self, filename, chunk_size=<NUM_LIT:8> * <NUM_LIT> * <NUM_LIT>):
<EOL>md5s = []<EOL>with open(filename, '<STR_LIT:rb>') as fp:<EOL><INDENT>while True:<EOL><INDENT>data = fp.read(chunk_size)<EOL>if not data:<EOL><INDENT>break<EOL><DEDENT>md5s.append(hashlib.md5(data))<EOL><DEDENT><DEDENT>digests = b"<STR_LIT>".join(m.digest() for m in md5s)<EOL>new_md5 = hashlib.md5(digests)<EOL>new_etag = '<STR_LIT>' % (new_md5.hexdigest(), len(md5s))<EOL>return new_etag.strip('<STR_LIT:">').strip("<STR_LIT:'>")<EOL>
Returns the md5 checksum of the provided file name after breaking it into chunks.

This is done to mirror the method used by Amazon S3 after a multipart upload.