code: def testShuffleAndRepeatFusion(self):
      expected = "ShuffleAndRepeat"
      dataset = (
          dataset_ops.Dataset.range(10)
          .apply(testing.assert_next([expected]))
          .shuffle(10)
          .repeat(2)
      )
      options = options_lib.Options()
      options.experimental_optimization.apply_default_optimizations = (
          False
      )
      options.experimental_optimization.shuffle_and_repeat_fusion = True
      dataset = dataset.with_options(options)
      get_next = self.getNext(dataset)
  
      for _ in range(2):
          results = []
          for _ in range(10):
              results.append(self.evaluate(get_next()))
          self.assertAllEqual([x for x in range(10)], sorted(results))
      with self.assertRaises(errors.OutOfRangeError):
          self.evaluate(get_next())
      with self.assertRaises(errors.OutOfRangeError):
          self.evaluate(get_next())
  
file_path: tensorflow-upstream/tensorflow/python/data/experimental/kernel_tests/optimization/shuffle_and_repeat_fusion_test.py
imports: from absl.testing import parameterized
  from tensorflow.python.data.experimental.ops import testing
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import options
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import errors
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the ShuffleAndRepeatFusionTest obj's underlying member method code with example usage: obj.testShuffleAndRepeatFusion() without return types