code: def get_dataloaders(
      model_type,
      records_list: List[List[dict]],
      tfms_list: [],
      batch_tfms=None,
      batch_size=16,
      num_workers=4,
      **dataloader_kwargs,
  ):
      """
      Creates and returns datasets and dataloaders:
  
      # Arguments
          model_type: can be one of these values: faster_rcnn, retinanet, mask_rcnn, efficientdet
          records: A list of records ->  [train_records, valid_records].
              Both train_records, valid_records are of type List[dict]
          tfms: List of Transforms to be applied to each dataset: [train_tfms, valid_tfms].
          batch_size: batch size.
          num_workers: number of workers.
  
      # Return
          - datasets: List containing train_ds and valid_ds -> [train_ds, valid_ds]
          - dataloaders: List containing train_dl and valid_dl -> [train_dl, valid_dl]
      """
  
      ds = []
      dls = []
  
      # Datasets
      train_ds = Dataset(records_list[0], tfms_list[0])
      valid_ds = Dataset(records_list[1], tfms_list[1])
  
      # Dataloaders
      train_dl = model_type.train_dl(
          train_ds,
          batch_tfms=batch_tfms,
          batch_size=batch_size,
          num_workers=num_workers,
          shuffle=True,
          **dataloader_kwargs,
      )
      valid_dl = model_type.valid_dl(
          valid_ds,
          batch_tfms=batch_tfms,
          batch_size=batch_size,
          num_workers=num_workers,
          shuffle=False,
          **dataloader_kwargs,
      )
  
      ds.append(train_ds)
      ds.append(valid_ds)
  
      dls.append(train_dl)
      dls.append(valid_dl)
  
      return ds, dls
  
file_path: icevision/icevision/models/utils.py
imports: from icevision.imports import *
  from icevision.utils import *
  from icevision.core import *
  from icevision.data import *
  from icevision.parsers import *
  from icevision.data.dataset import Dataset
label_desc: Use image node_id 8 for calling a global function with example usage: get_dataloaders(model_type, records_list, tfms_list, batch_tfms, batch_size, num_workers) and returns: ds,  dls