import hashlib


def md5(filename: str) -> str:
    """Generate the md5 hash for a file with given filename.

    :param filename: Name of the file to generate the MD5 hash for.
    :return: md5 hash of the file.
    """
    hash = hashlib.md5()
    with open(filename, "rb") as f:
        for chunk in iter(lambda: f.read(4096), b""):
            hash.update(chunk)
    return hash.hexdigest()