def create_block_header_with_signature(state: BeaconState, body_root: Hash32, privkey: int, slots_per_epoch: int, parent_root: Hash32=SAMPLE_HASH_1, state_root: Hash32=SAMPLE_HASH_2) -> BeaconBlockHeader:
    block_header = BeaconBlockHeader(slot=state.slot, parent_root=parent_root, state_root=state_root, body_root=body_root)
    block_header_signature = sign_transaction(message_hash=block_header.signing_root, privkey=privkey, state=state, slot=block_header.slot, signature_domain=SignatureDomain.DOMAIN_BEACON_PROPOSER, slots_per_epoch=slots_per_epoch)
    return block_header.copy(signature=block_header_signature)
def create_block_header_with_signature(state: BeaconState, body_root: Hash32, privkey: int, slots_per_epoch: int, parent_root: Hash32=SAMPLE_HASH_1, state_root: Hash32=SAMPLE_HASH_2) -> BeaconBlockHeader:
    block_header = BeaconBlockHeader(slot=state.slot, parent_root=parent_root, state_root=state_root, body_root=body_root)
    block_header_signature = sign_transaction(message_hash=block_header.signing_root, privkey=privkey, state=state, slot=block_header.slot, signature_domain=SignatureDomain.DOMAIN_BEACON_PROPOSER, slots_per_epoch=slots_per_epoch)
    return block_header.copy(signature=block_header_signature)