import hashlib


def md5sum(s):
    """MD5s the given string of data and returns the hexdigest.
    If you want the md5 of a file, call md5sum(open(fname).read())"""
    return hashlib.md5(s).hexdigest().lower()