def METHOD_NAME(
    keychain: seed.Keychain, script: messages.CardanoNativeScript
) -> bytes:
    from trezor.crypto import hashlib
    from apps.common import cbor
    from .helpers import SCRIPT_HASH_SIZE
    script_cbor = cbor.encode(cborize_native_script(keychain, script))
    prefixed_script_cbor = b"\00" + script_cbor
    return hashlib.blake2b(data=prefixed_script_cbor, outlen=SCRIPT_HASH_SIZE).digest()