class_docstr: This sampler takes in a dictionary of Iterators and returns batches
  associated with each key in the dictionary. It guarentees that we  will see
  each batch associated with each key exactly once in the epoch.
  
  Example:
  
      Iterator 1: [A, B, C, D], Iterator 2: [a, b]
  
      Output: [A, B, C, D, a, b]
class_docstr_tok: ["This","sampler","takes","in","a","dictionary","of","Iterators","and","returns","batches","associated","with","each","key","in","the","dictionary",".","It","guarentees","that","we","will","see","each","batch","associated","with","each","key","exactly","once","in","the","epoch",".","Example",":","Iterator","1",":","[","A",",","B",",","C",",","D","]",",","Iterator","2",":","[","a",",","b","]","Output",":","[","A",",","B",",","C",",","D",",","a",",","b","]"]
docstr: Loop through each key in the input dict and generate batches from
  the iterator associated with that key.
  
  Args:
      iterators: Dictionary of iterators
docstr_tok: ["Loop","through","each","key","in","the","input","dict","and","generate","batches","from","the","iterator","associated","with","that","key",".","Args",":","iterators",":","Dictionary","of","iterators"]
code: def batchify(self, iterators: Dict[str, Iterator]):
      """
      Loop through each key in the input dict and generate batches from
      the iterator associated with that key.
  
      Args:
          iterators: Dictionary of iterators
      """
      iter_dict = {
          name: iter(iterator) for name, iterator in iterators.items()
      }
      for name, it in iter_dict.items():
          for item in it:
              yield name, item
  
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 1 for calling the EvalBatchSampler obj's underlying member method code with example usage: obj.batchify(iterators) without return types