code: def test_round_robin_zip_datasets(self):
      long_dataset = lang_pair_dataset([10, 9, 8, 11])
      short_dataset = lang_pair_dataset([11, 9])
  
      dataset = RoundRobinZipDatasets(
          {"a": long_dataset, "b": short_dataset}
      )
      # Dataset is now sorted by sentence length
      dataset.ordered_indices()
      assert dataset.longest_dataset is long_dataset
      self.assertEqual(
          dict(dataset[0]), {"a": sample(2, 8), "b": sample(1, 9)}
      )
      # The item 2 of dataset 'a' is with item (2 % 2 = 0) of dataset 'b'
      self.assertEqual(
          dict(dataset[2]), {"a": sample(0, 10), "b": sample(1, 9)}
      )
  
file_path: fairseq/tests/test_dataset.py
imports: import logging
  import unittest
  from typing import Sequence
  from fairseq.data import LanguagePairDataset, ListDataset, RoundRobinZipDatasets
  from tests.test_train import mock_dict
label_desc: Use image node_id 3 for calling the TestDataset obj's underlying member method code with example usage: obj.test_round_robin_zip_datasets() without return types