code: def test_batch_group_shuffle(self):
      dataloader, dataset = self._create_dataloader(
          2, c.r, 16, dataset_config_wav
      )
      last_length = 0
      frames = dataset.samples
      for i, data in enumerate(dataloader):
          if i == self.max_loader_iter:
              break
          mel_lengths = data["mel_lengths"]
          avg_length = mel_lengths.numpy().mean()
      dataloader.dataset.preprocess_samples()
      is_items_reordered = False
      for idx, item in enumerate(dataloader.dataset.samples):
          if item != frames[idx]:
              is_items_reordered = True
              break
      self.assertGreaterEqual(avg_length, last_length)
      self.assertTrue(is_items_reordered)
  
file_path: TTS/tests/data_tests/test_loader.py
imports: import os
  import shutil
  import unittest
  import numpy
  import torch
  from torch.utils.data import DataLoader
  from tests import get_tests_data_path, get_tests_output_path
  from TTS.tts.configs.shared_configs import BaseDatasetConfig, BaseTTSConfig
  from TTS.tts.datasets import TTSDataset, load_tts_samples
  from TTS.tts.utils.text.tokenizer import TTSTokenizer
  from TTS.utils.audio import AudioProcessor
label_desc: Use image node_id 4 for calling the TestTTSDataset obj's underlying member method code with example usage: obj.test_batch_group_shuffle() without return types