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 _initialize_iterate_probs_from_counts(
      self, iterators: Dict[str, Iterator]
  ):
      for iterator_name, iterator in iterators.items():
          if iterator_name not in self.dataset_counts:
              self.dataset_counts[iterator_name] = self._dataset_count(
                  iterator
              )
  
      print(self.dataset_counts)
      print("Total data points:", sum(self.dataset_counts.values()))
  
      (
          self.iterator_names,
          self.iterator_probs,
      ) = extract_iterator_properties(self.dataset_counts)
  
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 4 for calling the NaturalBatchSampler obj's underlying member method code with example usage: obj._initialize_iterate_probs_from_counts(iterators) without return types