class_docstr: Wrapper for doing multitask training using multiple data objects.
  Takes a dictionary of data objects, does round robin over their
  iterators using BatchSampler.
  
  Args:
      config (Config): Configuration object of type DisjointMultitaskData.Config.
      data_dict (Dict[str, Data]): Data objects to do roundrobin over.
      *args (type): Extra arguments to be passed down to sub data handlers.
      **kwargs (type): Extra arguments to be passed down to sub data handlers.
  
  Attributes:
      data_dict (type): Data handlers to do roundrobin over.
docstr: Yield batches from each task, sampled according to a given sampler.
  This batcher additionally exposes a task name in the batch to allow the model
  to filter examples to the appropriate tasks.
code: def batches(self, stage: Stage, data_source=None, load_early=False):
      """Yield batches from each task, sampled according to a given sampler.
      This batcher additionally exposes a task name in the batch to allow the model
      to filter examples to the appropriate tasks."""
      if data_source is not None:
          # means being called in test workflow
          for batch in self.data_dict[self.test_key].batches(
              stage, data_source, load_early
          ):
              yield batch
      else:
          all_batches = {
              name: task.batches(stage, load_early=load_early)
              for name, task in self.data_dict.items()
          }
          sampled_batches = self.samplers[stage].batchify(all_batches)
  
          for name, (raw_batch, batch) in sampled_batches:
              batch[self.task_key] = name
              yield BatchData(raw_batch, batch)
  
file_path: pytext/pytext/data/disjoint_multitask_data.py
imports: from typing import Dict, Optional
  from pytext.common.constants import BatchContext, Stage
  from pytext.config.component import Component, ComponentType, create_component
  from pytext.data import BaseBatchSampler, Data, EvalBatchSampler, generator_iterator, RoundRobinBatchSampler
  from pytext.data.data import BatchData
label_desc: Use image node_id 3 for calling the DisjointMultitaskData obj's underlying member method code with example usage: obj.batches(stage, data_source, load_early) without return types