code: def get_batch_samplers(
      self, mult_ratios, required_batch_size_multiple, seed
  ):
      self.get_raw_batch_samplers(required_batch_size_multiple, seed)
      batch_samplers = []
      for i, _ in enumerate(self.datasets):
          if i > 0:
              sub_batch_sampler = [
                  [y + self.cumulative_sizes[i - 1] for y in x]
                  for x in self.raw_sub_batch_samplers[i]
              ]
          else:
              sub_batch_sampler = list(self.raw_sub_batch_samplers[i])
          smp_r = mult_ratios[i]
          if smp_r != 1:
              is_increase = "increased" if smp_r > 1 else "decreased"
              logger.info(
                  "number of batch for the dataset {} is {} from {} to {}".format(
                      self.id_to_mode[i],
                      is_increase,
                      len(sub_batch_sampler),
                      int(len(sub_batch_sampler) * smp_r),
                  )
              )
              mul_samplers = []
              for _ in range(math.floor(smp_r)):
                  mul_samplers = mul_samplers + sub_batch_sampler
              if math.floor(smp_r) != smp_r:
                  with data_utils.numpy_seed(seed + self._cur_epoch):
                      np.random.shuffle(sub_batch_sampler)
                      smp_num = int(
                          (smp_r - math.floor(smp_r))
                          * len(sub_batch_sampler)
                      )
                  mul_samplers = (
                      mul_samplers + sub_batch_sampler[:smp_num]
                  )
              sub_batch_sampler = mul_samplers
          else:
              logger.info(
                  "dataset {} batch number is {} ".format(
                      self.id_to_mode[i], len(sub_batch_sampler)
                  )
              )
          batch_samplers.append(sub_batch_sampler)
  
      return batch_samplers
  
imports: import logging
  import math
  from typing import List, Optional, NamedTuple
  import numpy
  import torch
  from fairseq.data import ConcatDataset, LanguagePairDataset, FileAudioDataset, data_utils
  from fairseq.data import FairseqDataset
label_desc: Use image node_id 9 for calling the MultiModalityDataset obj's underlying member method code with example usage: obj.get_batch_samplers(mult_ratios, required_batch_size_multiple, seed) and returns: batch_samplers