import hashlib


def md5(fname: str) -> str:
    """MD5 hash value for a file.

    Args:
        fname: File to calculate MD5.

    Returns:
        MD5 hash for filename.
    """
    md5h = hashlib.md5()
    with open(fname, "rb") as file:
        while True:
            data = file.read(1024 * 64)
            if not data:
                break
            md5h.update(data)
    return md5h.hexdigest()