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 __init__(self, config, dataset, sampler, shuffle=False):
      self.logger = getLogger()
      self._set_neg_sample_args(
          config,
          dataset,
          config["MODEL_INPUT_TYPE"],
          config["train_neg_sample_args"],
      )
      self.sample_size = len(dataset)
      super().__init__(config, dataset, sampler, shuffle=shuffle)
  
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 1 to create a new TrainDataLoader object from inherited base classes: NegSampleDataLoader with example: obj = TrainDataLoader(config, dataset, sampler, shuffle)