code: def test_concat_dataset_basics(self):
      d = ConcatDataset([self.dataset_1, self.dataset_2])
      assert len(d) == 2
      assert d[0]["source"][0] == 1
      assert d[1]["source"][0] == 2
  
      d = ConcatDataset(
          [self.dataset_1, self.dataset_2], sample_ratios=[1, 2]
      )
      assert len(d) == 3
      assert d[0]["source"][0] == 1
      assert d[1]["source"][0] == 2
      assert d[2]["source"][0] == 2
  
      d = ConcatDataset(
          [self.dataset_1, self.dataset_2], sample_ratios=[2, 1]
      )
      assert len(d) == 3
      assert d[0]["source"][0] == 1
      assert d[1]["source"][0] == 1
      assert d[2]["source"][0] == 2
  
file_path: fairseq/tests/test_concat_dataset.py
imports: import unittest
  import torch
  from fairseq.data import LanguagePairDataset, TokenBlockDataset
  from fairseq.data.concat_dataset import ConcatDataset
  from tests.test_train import mock_dict
label_desc: Use image node_id 2 for calling the TestConcatDataset obj's underlying member method code with example usage: obj.test_concat_dataset_basics() without return types