class_docstr: This sampler iterates over all the datasets, sampling according to
  the weighted number of samples in each dataset.
class_docstr_tok: ["This","sampler","iterates","over","all","the","datasets",",","sampling","according","to","the","weighted","number","of","samples","in","each","dataset","."]
code: def batchify(self, iterators: Dict[str, Iterator]):
      if self.iterator_names is None or self.iterator_probs is None:
          self._initialize_iterate_probs_from_counts(
              iterators=iterators
          )
      for batch in super().batchify(iterators=iterators):
          yield batch
  
imports: from collections.abc import Iterator
  from typing import Dict, Optional
  import numpy
  from pytext.config.component import Component, ComponentType
label_desc: Use image node_id 5 for calling the NaturalBatchSampler obj's underlying member method code with example usage: obj.batchify(iterators) without return types