def create_signed_attestation_at_slot(state: BeaconState, config: Eth2Config, state_machine: BaseBeaconStateMachine, attestation_slot: Slot, beacon_block_root: Hash32, validator_privkeys: Dict[(ValidatorIndex, int)], committee: Tuple[(ValidatorIndex, ...)], shard: Shard) -> Attestation:
    '\n    Create the attestations of the given ``attestation_slot`` slot with ``validator_privkeys``.\n    '
    state_transition = state_machine.state_transition
    state = state_transition.apply_state_transition(state, future_slot=attestation_slot)
    target_epoch = compute_epoch_of_slot(attestation_slot, config.SLOTS_PER_EPOCH)
    target_root = _get_target_root(state, config, beacon_block_root)
    parent_crosslink = state.current_crosslinks[shard]
    attestation_data = AttestationData(beacon_block_root=beacon_block_root, source=Checkpoint(epoch=state.current_justified_checkpoint.epoch, root=state.current_justified_checkpoint.root), target=Checkpoint(root=target_root, epoch=target_epoch), crosslink=Crosslink(shard=shard, parent_root=parent_crosslink.hash_tree_root, start_epoch=parent_crosslink.end_epoch, end_epoch=target_epoch))
    return _create_mock_signed_attestation(state, attestation_data, attestation_slot, committee, len(committee), keymapper((lambda index: state.validators[index].pubkey), validator_privkeys), config.SLOTS_PER_EPOCH)
Create the attestations of the given ``attestation_slot`` slot with ``validator_privkeys``.
def create_signed_attestation_at_slot(state: BeaconState, config: Eth2Config, state_machine: BaseBeaconStateMachine, attestation_slot: Slot, beacon_block_root: Hash32, validator_privkeys: Dict[(ValidatorIndex, int)], committee: Tuple[(ValidatorIndex, ...)], shard: Shard) -> Attestation:
    '\n    \n    '
    state_transition = state_machine.state_transition
    state = state_transition.apply_state_transition(state, future_slot=attestation_slot)
    target_epoch = compute_epoch_of_slot(attestation_slot, config.SLOTS_PER_EPOCH)
    target_root = _get_target_root(state, config, beacon_block_root)
    parent_crosslink = state.current_crosslinks[shard]
    attestation_data = AttestationData(beacon_block_root=beacon_block_root, source=Checkpoint(epoch=state.current_justified_checkpoint.epoch, root=state.current_justified_checkpoint.root), target=Checkpoint(root=target_root, epoch=target_epoch), crosslink=Crosslink(shard=shard, parent_root=parent_crosslink.hash_tree_root, start_epoch=parent_crosslink.end_epoch, end_epoch=target_epoch))
    return _create_mock_signed_attestation(state, attestation_data, attestation_slot, committee, len(committee), keymapper((lambda index: state.validators[index].pubkey), validator_privkeys), config.SLOTS_PER_EPOCH)