code: def md5sum(filename):
      
      hash_md5 = hashlib.md5()
      with open(filename, 'rb') as handle:
          for chunk in iter(lambda: handle.read(4096), b''):
              hash_md5.update(chunk)
      return hash_md5.hexdigest()
docs: Calculate the md5sum of a file and return the hexdigest.