class_docstr: MultiDatasetLoader class that is used for training on multiple datasets together.
class_docstr_tok: ["MultiDatasetLoader","class","that","is","used","for","training","on","multiple","datasets","together","."]
code: def build_dataloaders(self):
      assert len(self._datasets) > 0, "Call build_datasets first"
  
      for dataset_instance in self.datasets:
          loader_instance, _ = build_dataloader_and_sampler(
              dataset_instance, self.config.training
          )
          sampler_instance = loader_instance.sampler
          self.loaders[dataset_instance.name] = loader_instance
          self.samplers[dataset_instance.name] = sampler_instance
  
      self.current_loader = self.loaders[self.current_dataset_name]
  
imports: import logging
  import warnings
  from typing import Dict, Iterator
  import torch
  from mmf.common.sample import convert_batch_to_sample_list, SampleList
  from mmf.datasets import iteration_strategies
  from mmf.utils.build import build_dataloader_and_sampler, build_dataset
  from mmf.utils.dataset import dataset_list_from_config
  from mmf.utils.distributed import broadcast_scalar, get_world_size, is_dist_initialized, is_main, is_xla
  from mmf.utils.general import get_batch_size, get_current_device
  from omegaconf import OmegaConf
  from torch.utils.data.dataloader import DataLoader, Sampler
label_desc: Use image node_id 6 for calling the MultiDatasetLoader obj's underlying member method code with example usage: obj.build_dataloaders() without return types