code: def get_multipart_md5(self, filename, chunk_size=8 * 1024 * 1024):
          
          # Loop through the file contents ...
          md5s = []
          with open(filename, 'rb') as fp:
              while True:
                  # Break it into chunks
                  data = fp.read(chunk_size)
                  # Finish when there are no more
                  if not data:
                      break
                  # Generate a md5 hash for each chunk
                  md5s.append(hashlib.md5(data))
  
          # Combine the chunks
          digests = b"".join(m.digest() for m in md5s)
  
          # Generate a new hash using them
          new_md5 = hashlib.md5(digests)
  
          # Create the ETag as Amazon will
          new_etag = '"%s-%s"' % (new_md5.hexdigest(), len(md5s))
  
          # Trim it down and pass it back for comparison
          return new_etag.strip('"').strip("'")
docs: 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.