def METHOD_NAME(header: BlockHeaderAPI) -> Hash32:
    """
    Return the hash that is signed by the block producer. It is defined as the hash of
    the ``header`` except that the last 65 bytes of the ``extra_data`` (the signature)
    are removed before calculating the hash.
    """
    if len(header.extra_data) < SIGNATURE_LENGTH:
        raise ValueError("header.extra_data too short to contain signature")
    signature_header: BlockHeaderAPI = header.copy(
        extra_data=header.extra_data[: len(header.extra_data) - SIGNATURE_LENGTH]
    )
    return signature_header.hash