@to_tuple
def create_mock_signed_attestations_at_slot(state: BeaconState, config: Eth2Config, state_machine: BaseBeaconStateMachine, attestation_slot: Slot, beacon_block_root: Hash32, keymap: Dict[(BLSPubkey, int)], voted_attesters_ratio: float=1.0) -> Iterable[Attestation]:
    '\n    Create the mocking attestations of the given ``attestation_slot`` slot with ``keymap``.\n    '
    crosslink_committees_at_slot = get_crosslink_committees_at_slot(state, attestation_slot, config)
    target_root = _get_target_root(state, config, beacon_block_root)
    target_epoch = compute_epoch_of_slot(state.slot, config.SLOTS_PER_EPOCH)
    for crosslink_committee in crosslink_committees_at_slot:
        (committee, shard) = crosslink_committee
        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=min(target_epoch, (parent_crosslink.end_epoch + config.MAX_EPOCHS_PER_CROSSLINK))))
        num_voted_attesters = int((len(committee) * voted_attesters_ratio))
        (yield _create_mock_signed_attestation(state, attestation_data, attestation_slot, committee, num_voted_attesters, keymap, config.SLOTS_PER_EPOCH))
Create the mocking attestations of the given ``attestation_slot`` slot with ``keymap``.
@to_tuple
def create_mock_signed_attestations_at_slot(state: BeaconState, config: Eth2Config, state_machine: BaseBeaconStateMachine, attestation_slot: Slot, beacon_block_root: Hash32, keymap: Dict[(BLSPubkey, int)], voted_attesters_ratio: float=1.0) -> Iterable[Attestation]:
    '\n    \n    '
    crosslink_committees_at_slot = get_crosslink_committees_at_slot(state, attestation_slot, config)
    target_root = _get_target_root(state, config, beacon_block_root)
    target_epoch = compute_epoch_of_slot(state.slot, config.SLOTS_PER_EPOCH)
    for crosslink_committee in crosslink_committees_at_slot:
        (committee, shard) = crosslink_committee
        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=min(target_epoch, (parent_crosslink.end_epoch + config.MAX_EPOCHS_PER_CROSSLINK))))
        num_voted_attesters = int((len(committee) * voted_attesters_ratio))
        (yield _create_mock_signed_attestation(state, attestation_data, attestation_slot, committee, num_voted_attesters, keymap, config.SLOTS_PER_EPOCH))