code: def train_dl(
      dataset, batch_tfms=None, **dataloader_kwargs
  ) -> DataLoader:
      """A `DataLoader` with a custom `collate_fn` that batches items as required for training the model.
  
      # Arguments
          dataset: Possibly a `Dataset` object, but more generally, any `Sequence` that returns records.
          batch_tfms: Transforms to be applied at the batch level.
          **dataloader_kwargs: Keyword arguments that will be internally passed to a Pytorch `DataLoader`.
          The parameter `collate_fn` is already defined internally and cannot be passed here.
  
      # Returns
          A Pytorch `DataLoader`.
      """
      return transform_dl(
          dataset=dataset,
          build_batch=build_train_batch,
          batch_tfms=batch_tfms,
          **dataloader_kwargs,
      )
  
file_path: icevision/icevision/models/fastai/unet/dataloaders.py
imports: from icevision.imports import *
  from icevision.core import *
  from icevision.models.utils import *
label_desc: Use image node_id 1 for calling a global function with example usage: train_dl(dataset, batch_tfms) and returns: transform_dl