code: def test_shuffle(self, mock1, mock2):
      # test seed=None
      sampler = BatchAugSampler(self.dataset, seed=None)
      self.assertEqual(sampler.seed, 7)
  
      # test random seed
      sampler = BatchAugSampler(self.dataset, shuffle=True, seed=0)
      sampler.set_epoch(10)
      g = torch.Generator()
      g.manual_seed(10)
      indices = [
          x
          for x in torch.randperm(len(self.dataset), generator=g)
          for _ in range(3)
      ]
      self.assertEqual(list(sampler), indices)
  
      sampler = BatchAugSampler(self.dataset, shuffle=True, seed=42)
      sampler.set_epoch(10)
      g = torch.Generator()
      g.manual_seed(42 + 10)
      indices = [
          x
          for x in torch.randperm(len(self.dataset), generator=g)
          for _ in range(3)
      ]
      self.assertEqual(list(sampler), indices)
  
file_path: mmocr/tests/test_datasets/test_samplers/test_batch_aug.py
imports: from unittest import TestCase
  from unittest.mock import patch
  import torch
  from mmengine.logging import MMLogger
  from mmocr.datasets import BatchAugSampler
label_desc: Use image node_id 4 for calling the TestBatchAugSampler obj's underlying member method code with example usage: obj.test_shuffle(mock1, mock2) without return types