code: def test_torch_dataloader(self):
      from tests.helpers.datasets.torch_data import TorchNormalDataset
      from torch.utils.data import DataLoader
  
      bses = [8, 16, 40]
      all_sanity_batches = [4, 7, 10]
      for bs in bses:
          for sanity_batches in all_sanity_batches:
              dataset = TorchNormalDataset(num_of_data=1000)
              dataloader = DataLoader(
                  dataset, batch_size=bs, shuffle=True
              )
              wrapper = _TruncatedDataLoader(
                  dataloader, num_batches=sanity_batches
              )
              dataloader = iter(wrapper)
              all_supposed_running_data_num = 0
              while True:
                  try:
                      _data = next(dataloader)
                  except StopIteration:
                      break
                  all_supposed_running_data_num += _data.shape[0]
              assert (
                  all_supposed_running_data_num == bs * sanity_batches
              )
  
imports: from functools import reduce
  import pytest
  from fastNLP.core.controllers.utils.utils import _TruncatedDataLoader
  from tests.helpers.datasets.normal_data import NormalSampler
label_desc: Use image node_id 2 for calling the Test_WrapDataLoader obj's underlying member method code with example usage: obj.test_torch_dataloader() without return types