def test_parallel_with_gradual_reweighting_remainders_big(self):
    """Test of the parallel ccmbinator with weights and minimum."""
    dataset1 = lambda: (i for i in itertools.cycle(range(1)))
    dataset2 = lambda: (i for i in itertools.cycle(range(10, 30)))
    dataset3 = lambda: (i for i in itertools.cycle(range(30, 80)))
    dataset4 = lambda: (i for i in itertools.cycle(range(100, 220)))
    parallel = data.Parallel([dataset2, dataset1, dataset4, dataset3],
                             counters=(20, 1, 120, 50),
                             gradually_reweight=True,
                             use_remainders=True)
    generator = parallel()

    for _ in range(3):
      self.assertEqual(next(generator), 0)
      for i in range(20):
        self.assertEqual(next(generator), 10 + i)
        for j in range(2):
          self.assertEqual(next(generator), 30 + 2 * i + j)
          for k in range(2):
            self.assertEqual(next(generator), 100 + 2 * 2 * i + 2 * j + k)
      # Here we process the remainder from datasets 3 and 4:
      for i in range(10):
        self.assertEqual(next(generator), 70 + i)
      for i in range(40):
        self.assertEqual(next(generator), 180 + i)
Test of the parallel ccmbinator with weights and minimum.
trax/data/inputs_test.py