class_docstr: Allows to combine outputs of two or more Reader objects, sampling them with a configurable probability.
  Complies to the same interfaces as :class:`~petastorm.reader.Reader`, hence
  :class:`~petastorm.weighted_sampling_reader.WeightedSamplingReader` can be used anywhere the
  :class:`~petastorm.reader.Reader` can be used.
class_docstr_tok: ["Allows","to","combine","outputs","of","two","or","more","Reader","objects",",","sampling","them","with","a","configurable","probability",".","Complies","to","the","same","interfaces","as",":","class",":","`","~petastorm.reader.Reader","`",",","hence",":","class",":","`","~petastorm.weighted_sampling_reader.WeightedSamplingReader","`","can","be","used","anywhere","the",":","class",":","`","~petastorm.reader.Reader","`","can","be","used","."]
code: def __next__(self):
      r = np.random.random()
      reader_index = np.where(r < self._cum_prob)[0][0]
      return next(self._readers[reader_index])
  
file_path: petastorm/petastorm/weighted_sampling_reader.py
imports: from __future__ import division
  import numpy
label_desc: Use image node_id 4 for calling the WeightedSamplingReader obj's underlying member method code with example usage: obj.__next__() and returns: next