import hashlib


def tagged_hash_init(tag: str, data: bytes = b""):
    """Prepares a tagged hash function to digest extra data"""
    hashtag = hashlib.sha256(tag.encode()).digest()
    h = hashlib.sha256(hashtag + hashtag + data)
    return h