class_docstr: Test `apply_effects_file` in multi-process dataloader setting
class_docstr_tok: ["Test","`","apply_effects_file","`","in","multi-process","dataloader","setting"]
code: def test_apply_effects_file(self):
      sample_rate = 12000
      flist = self._generate_dataset()
      dataset = RandomPerturbationFile(flist, sample_rate)
      loader = torch.utils.data.DataLoader(
          dataset,
          batch_size=32,
          num_workers=4,
          worker_init_fn=init_random_seed,
          multiprocessing_context=torch.multiprocessing.get_context(
              "spawn"
          ),
      )
      for batch in loader:
          assert batch.shape == (32, 2, 2 * sample_rate)
  
imports: import os
  import platform
  import sys
  from concurrent.futures import ProcessPoolExecutor
  from typing import List, Tuple
  from unittest import skipIf
  import numpy
  import torch
  import torchaudio
  from torchaudio_unittest.common_utils import get_whitenoise, PytorchTestCase, save_wav, skipIfNoSox, TempDirMixin
label_desc: Use image node_id 2 for calling the TestSoxEffectsDataset obj's underlying member method code with example usage: obj.test_apply_effects_file() without return types