code: def test_default_collate_fn(self):
      ds = DataSet(
          {
              "x": [[1, 2], [2, 3, 4], [4, 5, 6, 7]] * 10,
              "y": [1, 0, 1] * 10,
          }
      )
      with pytest.raises(ValueError):
          fdl = TorchDataLoader(ds, batch_size=3, collate_fn=None)
      import numpy as np
  
      class _DataSet:
          def __init__(self):
              pass
  
          def __getitem__(self, item):
              return np.random.randn(5), [[1, 2], [2, 3, 4]]
  
          def __len__(self):
              return 10
  
      fdl = TorchDataLoader(
          _DataSet(), batch_size=3, collate_fn=None, drop_last=True
      )
      for batch in fdl:
          assert batch[0].shape == torch.Size([3, 5])
  
file_path: fastNLP/tests/core/dataloaders/torch_dataloader/test_fdl.py
imports: import pytest
  from fastNLP.core.dataloaders.torch_dataloader import TorchDataLoader, prepare_torch_dataloader
  from fastNLP.core.dataset import DataSet
  from fastNLP.io.data_bundle import DataBundle
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH
  from pkg_resources import parse_version
  from tests.helpers.utils import Capturing, recover_logger
  from fastNLP import logger
  import numpy
label_desc: Use image node_id 5 for calling the TestFdl obj's underlying member method code with example usage: obj.test_default_collate_fn() and returns: np,  list, int