rng_respecting_sample function

Sampling in which zero probabilities are removed