code: def testRerandomizeRepeatEpochs(self, rerandomize):
      dataset = dataset_ops.Dataset.random(
          seed=42, rerandomize_each_iteration=rerandomize, name="random"
      ).take(10)
      dataset = dataset.repeat(2)
      next_element = self.getNext(dataset, requires_initialization=True)
      first_epoch = []
      for _ in range(10):
          first_epoch.append(self.evaluate(next_element()))
      second_epoch = []
      for _ in range(10):
          second_epoch.append(self.evaluate(next_element()))
  
      if rerandomize:
          self.assertEqual(
              first_epoch == second_epoch,
              not rerandomize or rerandomize is None,
          )
      else:
          self.assertEqual(first_epoch, second_epoch)
  
imports: import warnings
  from absl.testing import parameterized
  from tensorflow.python import tf2
  from tensorflow.python.data.kernel_tests import checkpoint_test_base
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import random_seed
  from tensorflow.python.platform import test
label_desc: Use image node_id 4 for calling the RandomTest obj's underlying member method code with example usage: obj.testRerandomizeRepeatEpochs(rerandomize) without return types