def METHOD_NAME(self):
    data = self.tmp_path("test_train_dataset")
    mk_dataset(20, 10, data / "en" / "train.bin")
    mk_dataset(10, 10, data / "zh" / "train.bin")
    task, model = self.obt_task(["en", "zh"], data)
    task.load_dataset("train")
    en_bos = obt._lang_token_index(task.common_dict, "en")
    zh_bos = obt._lang_token_index(task.common_dict, "zh")
    train = task.datasets["train"]
    train.ordered_indices()
    train.prefetch([0, 19])
    sample_0 = train[0]
    sample_19 = train[19]
    self.assertEqual(
        set(sample_0.keys()), {"en-BT", "en-DENOISE", "zh-BT", "zh-DENOISE"}
    )
    for sample in (sample_0, sample_19):
        self.assertEqual(sample["en-BT"]["source"][0], en_bos)
        # bt target isn't ready to look at.
        self.assertEqual(sample["en-DENOISE"]["source"][0], en_bos)
        # TODO What could we check on the target side ?
    for i in range(10):
        # Zh dataset is shorter, and is wrapped around En dataset.
        train.prefetch([i, i + 10])
        self.assertEqual(
            list(train[i]["zh-DENOISE"]["source"]),
            list(train[i + 10]["zh-DENOISE"]["source"]),
        )
        self.assertEqual(train[i]["zh-DENOISE"]["source"][0].item(), zh_bos)
    # Sorted by increasing len
    self.assertLess(
        len(sample_0["en-BT"]["source"]), len(sample_19["en-BT"]["source"])
    )