code: def test_equal_sampling(self):
      registry.get(
          "config"
      ).training.dataset_size_proportional_sampling = False
      self.multi_dataset._infer_dataset_probabilities()
      count = 0
      count_c = 0
      for batch in self.multi_dataset:
          batch = self.multi_dataset.prepare_batch(batch)
          if "c" in batch:
              count_c += 1
          count += 1
          if count == 100:
              break
  
      self.assertTrue(count_c <= 34)
  
      # Epoch will never finish for this case, so test upto proportional sampling's
      # epoch length + some extra
      for batch in self.multi_dataset:
          batch = self.multi_dataset.prepare_batch(batch)
          count += 1
          if count > self.multi_dataset._total_length // 4 + 100:
              break
  
      # The test should reach at this stage and should not be finished at
      # epoch length
      self.assertTrue(
          count > self.multi_dataset._total_length // 4 + 100
      )
  
file_path: mmf/tests/datasets/test_multi_dataset_loader.py
imports: import unittest
  from collections import Counter
  import numpy
  import torch
  from mmf.common.registry import registry
  from mmf.datasets.multi_dataset_loader import MultiDatasetLoader
  from omegaconf import OmegaConf
  from torch.utils.data import DataLoader
  from ..test_utils import NumbersDataset
label_desc: Use image node_id 5 for calling the TestMultiDatasetLoader obj's underlying member method code with example usage: obj.test_equal_sampling() without return types