class_docstr: The ``IceVisionAdapter`` is an :class:`~flash.core.adapter.Adapter` for integrating with IceVision.
code: def process_train_dataset(
      self,
      dataset: InputBase,
      batch_size: int,
      num_workers: int = 0,
      pin_memory: bool = False,
      shuffle: bool = True,
      drop_last: bool = True,
      sampler: Optional[Sampler] = None,
      persistent_workers: bool = False,
      input_transform: Optional[InputTransform] = None,
      trainer: Optional["flash.Trainer"] = None,
  ) -> DataLoader:
      data_loader = import_module(self.model_type).train_dl(
          dataset,
          batch_size=batch_size,
          num_workers=num_workers,
          pin_memory=pin_memory,
          shuffle=shuffle,
          drop_last=drop_last,
          sampler=sampler,
          persistent_workers=persistent_workers,
      )
  
      data_loader = self._update_collate_fn_dataloader(
          functools.partial(
              self._wrap_collate_fn, data_loader.collate_fn
          ),
          data_loader,
      )
  
      input_transform = input_transform or self.input_transform
      if input_transform is not None:
          input_transform.inject_collate_fn(data_loader.collate_fn)
          data_loader = self._update_collate_fn_dataloader(
              create_worker_input_transform_processor(
                  RunningStage.TRAINING, input_transform
              ),
              data_loader,
          )
      return data_loader
  
imports: import functools
  from importlib import import_module
  from typing import Any, Dict, Optional
  from torch import Tensor
  from torch.utils.data import DataLoader, Sampler
  import flash
  from flash.core.adapter import Adapter
  from flash.core.data.io.input import DataKeys, InputBase
  from flash.core.data.io.input_transform import InputTransform, create_worker_input_transform_processor
  from flash.core.integrations.icevision.transforms import from_icevision_predictions, from_icevision_record, to_icevision_record
  from flash.core.integrations.icevision.wrappers import wrap_icevision_adapter
  from flash.core.model import Task
  from flash.core.utilities.imports import _ICEVISION_AVAILABLE
  from flash.core.utilities.stages import RunningStage
  from flash.core.utilities.url_error import catch_url_error
label_desc: Use image node_id 5 for calling the IceVisionAdapter obj's underlying member method code with example usage: obj.process_train_dataset(dataset, batch_size, num_workers, pin_memory, shuffle, drop_last, sampler, persistent_workers, input_transform, trainer) and returns: data_loader