code: def testRandomAccessBatchWithShuffle(self):
      dataset = dataset_ops.Dataset.from_tensor_slices(
          [1, 2, 3, 4, 5, 6, 7]
      )
      shuffle_dataset = dataset.shuffle(buffer_size=10, seed=2)
      batch_dataset = shuffle_dataset.batch(2)
  
      expected_output = [
          np.array([5, 2], dtype=np.int32),
          np.array([4, 7], dtype=np.int32),
          np.array([1, 3], dtype=np.int32),
          np.array([6], dtype=np.int32),
      ]
      for i in range(4):
          self.assertAllEqual(
              expected_output[i],
              self.evaluate(random_access.at(batch_dataset, i)),
          )
  
      # Checks the order is consistent with shuffle dataset.
      for i in range(3):
          self.assertAllEqual(
              expected_output[i][0],
              self.evaluate(random_access.at(shuffle_dataset, i * 2)),
          )
          self.assertAllEqual(
              expected_output[i][1],
              self.evaluate(
                  random_access.at(shuffle_dataset, (i * 2) + 1)
              ),
          )
  
      # Checks the remainder is the last element in shuffled dataset.
      self.assertAllEqual(
          expected_output[3][0],
          self.evaluate(random_access.at(shuffle_dataset, 6)),
      )
  
imports: import time
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.checkpoint import checkpoint_management
  from tensorflow.python.data.experimental.ops import random_access
  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.data.ops import options
  from tensorflow.python.data.util import nest
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import script_ops
  from tensorflow.python.ops.ragged import ragged_concat_ops
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.ops.ragged import ragged_math_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.platform import test
label_desc: Use image node_id 4 for calling the BatchRandomAccessTest obj's underlying member method code with example usage: obj.testRandomAccessBatchWithShuffle() without return types