class_docstr: Stores multiple instances of FairseqDataset together and in every iteration
  creates a batch by first sampling a dataset according to a specified
  probability distribution and then getting instances from that dataset.
  
  Args:
      datasets: an OrderedDict of FairseqDataset instances.
      sampling_func: A function for sampling over list of dataset keys.
          The default strategy is to sample uniformly.
class_docstr_tok: ["Stores","multiple","instances","of","FairseqDataset","together","and","in","every","iteration","creates","a","batch","by","first","sampling","a","dataset","according","to","a","specified","probability","distribution","and","then","getting","instances","from","that","dataset",".","Args",":","datasets",":","an","OrderedDict","of","FairseqDataset","instances",".","sampling_func",":","A","function","for","sampling","over","list","of","dataset","keys",".","The","default","strategy","is","to","sample","uniformly","."]
docstr: Generate a mini-batch for this dataset.
  To convert this into a regular mini-batch we use the following
  logic:
      1. Select a dataset using the specified probability distribution.
      2. Call the collater function of the selected dataset.
docstr_tok: ["Generate","a","mini-batch","for","this","dataset",".","To","convert","this","into","a","regular","mini-batch","we","use","the","following","logic",":","1",".","Select","a","dataset","using","the","specified","probability","distribution",".","2",".","Call","the","collater","function","of","the","selected","dataset","."]
code: def collater(self, samples: List[Dict]):
      """
      Generate a mini-batch for this dataset.
      To convert this into a regular mini-batch we use the following
      logic:
          1. Select a dataset using the specified probability distribution.
          2. Call the collater function of the selected dataset.
      """
      if len(samples) == 0:
          return None
  
      selected_key = self.sampling_func(list(self.datasets.keys()))
      selected_samples = [sample[selected_key] for sample in samples]
      return self.datasets[selected_key].collater(selected_samples)
  
file_path: fairseq/fairseq/data/multi_corpus_sampled_dataset.py
imports: from collections import OrderedDict
  from typing import Callable, Dict, List
  import numpy
  from .None import FairseqDataset
label_desc: Use image node_id 6 for calling the MultiCorpusSampledDataset obj's underlying member method code with example usage: obj.collater(samples) and returns: self, None