class_docstr: Orders instances in a round-robin fashion, where we take one instance from every dataset in
  turn. When one dataset runs out, we continue iterating round-robin through the rest.
  
  Registered as a `MultiTaskScheduler` with name "roundrobin".
class_docstr_tok: ["Orders","instances","in","a","round-robin","fashion",",","where","we","take","one","instance","from","every","dataset","in","turn",".","When","one","dataset","runs","out",",","we","continue","iterating","round-robin","through","the","rest",".","Registered","as","a","`","MultiTaskScheduler","`","with","name","``","roundrobin","''","."]
code: def batch_instances(
      self, epoch_instances: Dict[str, Iterable[Instance]]
  ) -> Iterable[List[Instance]]:
      return _chunked_iterator(
          more_itertools.roundrobin(*epoch_instances.values()),
          self.batch_size,
          self.drop_last,
      )
  
imports: from collections import defaultdict
  from typing import Any, Dict, Iterable, Union, List, Mapping
  import more_itertools
  from allennlp.common.registrable import Registrable
  from allennlp.data.instance import Instance
label_desc: Use image node_id 2 for calling the RoundRobinScheduler obj's underlying member method code with example usage: obj.batch_instances(epoch_instances) and returns: _chunked_iterator