def create_mock_proposer_slashing_at_block(state: BeaconState, config: Eth2Config, keymap: Dict[(BLSPubkey, int)], block_root_1: Hash32, block_root_2: Hash32, proposer_index: ValidatorIndex) -> ProposerSlashing:
    '\n    Return a `ProposerSlashing` derived from the given block roots.\n\n    If the header roots do not match, the `ProposerSlashing` is valid.\n    If the header roots do match, the `ProposerSlashing` is not valid.\n    '
    slots_per_epoch = config.SLOTS_PER_EPOCH
    block_header_1 = create_block_header_with_signature(state, block_root_1, keymap[state.validators[proposer_index].pubkey], slots_per_epoch)
    block_header_2 = create_block_header_with_signature(state, block_root_2, keymap[state.validators[proposer_index].pubkey], slots_per_epoch)
    return ProposerSlashing(proposer_index=proposer_index, header_1=block_header_1, header_2=block_header_2)
Return a `ProposerSlashing` derived from the given block roots.

If the header roots do not match, the `ProposerSlashing` is valid.
If the header roots do match, the `ProposerSlashing` is not valid.
def create_mock_proposer_slashing_at_block(state: BeaconState, config: Eth2Config, keymap: Dict[(BLSPubkey, int)], block_root_1: Hash32, block_root_2: Hash32, proposer_index: ValidatorIndex) -> ProposerSlashing:
    '\n    Return a `ProposerSlashing` derived from the given block roots.\n\n    If the header roots do not match, the `ProposerSlashing` is valid.\n    If the header roots do match, the `ProposerSlashing` is not valid.\n    '
    slots_per_epoch = config.SLOTS_PER_EPOCH
    block_header_1 = create_block_header_with_signature(state, block_root_1, keymap[state.validators[proposer_index].pubkey], slots_per_epoch)
    block_header_2 = create_block_header_with_signature(state, block_root_2, keymap[state.validators[proposer_index].pubkey], slots_per_epoch)
    return ProposerSlashing(proposer_index=proposer_index, header_1=block_header_1, header_2=block_header_2)