def generate_new_seed(idx, pool, weights, distribution, lam=256.0,
                      with_replacement=True):
    assert len(pool) == len(weights) == len(distribution)
    # instantiate
    if lam is not None:
        n_stream = 1 + np.random.poisson(lam=lam)
    else:
        n_stream = None

    # If we're sampling without replacement, zero this one out
    if not with_replacement:
        distribution[idx] = 0.0

        if (distribution > 0).any():
            distribution[:] /= np.sum(distribution)

    return pool[idx].generate(max_batches=n_stream), weights[idx]
>>> s = ['a', 'b', 'c', 'd', b'']
dataset/ETHPy150Open bmcfee/pescador/pescador/util.py/generate_new_seed--crossover with--dataset/ETHPy150Open richardkiss/pycoin/pycoin/tx/script/microcode.py/do_OP_PICK