def mapper(self, _, line):
        if random.random() < self.sampling_probability:
            seed = '%20i' % random.randint(0, sys.maxsize)
            yield None, (seed, line)
For each log line, with probability self.sampling_probability,
dataset/ETHPy150Open Yelp/mrjob/mrjob/examples/mr_log_sampler.py/MRLogSampler.mapper