def _mk_some_pending_attestations_with_some_participation_in_epoch(state: BeaconState, epoch: Epoch, config: Eth2Config, participation_ratio: float, number_of_shards_to_check: int) -> Iterable[PendingAttestation]:
    block_root = get_block_root(state, epoch, config.SLOTS_PER_EPOCH, config.SLOTS_PER_HISTORICAL_ROOT)
    epoch_start_shard = get_start_shard(state, epoch, CommitteeConfig(config))
    if (epoch == state.current_epoch(config.SLOTS_PER_EPOCH)):
        parent_crosslinks = state.current_crosslinks
    else:
        parent_crosslinks = state.previous_crosslinks
    for shard in range(epoch_start_shard, (epoch_start_shard + number_of_shards_to_check)):
        shard = Shard((shard % config.SHARD_COUNT))
        crosslink_committee = get_crosslink_committee(state, epoch, shard, CommitteeConfig(config))
        if (not crosslink_committee):
            continue
        participants_count = math.ceil((participation_ratio * len(crosslink_committee)))
        if (not participants_count):
            return tuple()
        (yield mk_pending_attestation_from_committee(parent_crosslinks[shard], participants_count, shard, target_epoch=epoch, target_root=block_root))
def _mk_some_pending_attestations_with_some_participation_in_epoch(state: BeaconState, epoch: Epoch, config: Eth2Config, participation_ratio: float, number_of_shards_to_check: int) -> Iterable[PendingAttestation]:
    block_root = get_block_root(state, epoch, config.SLOTS_PER_EPOCH, config.SLOTS_PER_HISTORICAL_ROOT)
    epoch_start_shard = get_start_shard(state, epoch, CommitteeConfig(config))
    if (epoch == state.current_epoch(config.SLOTS_PER_EPOCH)):
        parent_crosslinks = state.current_crosslinks
    else:
        parent_crosslinks = state.previous_crosslinks
    for shard in range(epoch_start_shard, (epoch_start_shard + number_of_shards_to_check)):
        shard = Shard((shard % config.SHARD_COUNT))
        crosslink_committee = get_crosslink_committee(state, epoch, shard, CommitteeConfig(config))
        if (not crosslink_committee):
            continue
        participants_count = math.ceil((participation_ratio * len(crosslink_committee)))
        if (not participants_count):
            return tuple()
        (yield mk_pending_attestation_from_committee(parent_crosslinks[shard], participants_count, shard, target_epoch=epoch, target_root=block_root))