code: def testRerandomizeInsideFunction(self, rerandomize):
      @def_function.function
      def make_dataset():
          dataset = dataset_ops.Dataset.random(
              seed=42,
              rerandomize_each_iteration=rerandomize,
              name="random",
          ).take(10)
          return dataset
  
      dataset = make_dataset()
      first_epoch = self.getDatasetOutput(dataset)
      second_epoch = self.getDatasetOutput(dataset)
  
      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 5 for calling the RandomTest obj's underlying member method code with example usage: obj.testRerandomizeInsideFunction(rerandomize) and returns: dataset