from hashlib import md5


def md5checksum(file_name):
    """Compute MD5 checksum on a file, even if it is quite large"""
    hash_md5 = md5()
    with open(file_name, "rb") as f:
        for chunk in iter(lambda: f.read(32768), b""):
            hash_md5.update(chunk)
    return hash_md5.hexdigest()