class_docstr: :class:`TrainDataLoader` is a dataloader for training.
  It can generate negative interaction when :attr:`training_neg_sample_num` is not zero.
  For the result of every batch, we permit that every positive interaction and its negative interaction
  must be in the same batch.
  
  Args:
      config (Config): The config of dataloader.
      dataset (Dataset): The dataset of dataloader.
      sampler (Sampler): The sampler of dataloader.
      shuffle (bool, optional): Whether the dataloader will be shuffle after a round. Defaults to ``False``.
code: def collate_fn(self, index):
      index = np.array(index)
      data = self._dataset[index]
      transformed_data = self.transform(self._dataset, data)
      return self._neg_sampling(transformed_data)
  
imports: import numpy
  import torch
  from logging import getLogger
  from recbole.data.dataloader.abstract_dataloader import AbstractDataLoader, NegSampleDataLoader
  from recbole.data.interaction import Interaction, cat_interactions
  from recbole.utils import InputType, ModelType
label_desc: Use image node_id 4 for calling the TrainDataLoader obj's underlying member method code with example usage: obj.collate_fn(index) and returns: self