code: def create_loader(
      datasets,
      samplers,
      batch_size,
      num_workers,
      is_trains,
      collate_fns,
  ):
      loaders = []
      for dataset, sampler, bs, n_worker, is_train, collate_fn in zip(
          datasets,
          samplers,
          batch_size,
          num_workers,
          is_trains,
          collate_fns,
      ):
          if is_train:
              shuffle = sampler is None
              drop_last = True
          else:
              shuffle = False
              drop_last = False
          loader = DataLoader(
              dataset,
              batch_size=bs,
              num_workers=n_worker,
              pin_memory=True,
              sampler=sampler,
              shuffle=shuffle,
              collate_fn=collate_fn,
              drop_last=drop_last,
          )
          loaders.append(loader)
      return loaders
  
file_path: blip/data/__init__.py
imports: import torch
  from torch.utils.data import DataLoader
  from torchvision import transforms
  from torchvision.transforms.functional import InterpolationMode
  from data.coco_karpathy_dataset import coco_karpathy_train, coco_karpathy_caption_eval, coco_karpathy_retrieval_eval
  from data.nocaps_dataset import nocaps_eval
  from data.flickr30k_dataset import flickr30k_train, flickr30k_retrieval_eval
  from data.vqa_dataset import vqa_dataset
  from data.nlvr_dataset import nlvr_dataset
  from data.pretrain_dataset import pretrain_dataset
  from transform.randaugment import RandomAugment
label_desc: Use image node_id 3 for calling a global function with example usage: create_loader(datasets, samplers, batch_size, num_workers, is_trains, collate_fns) and returns: loaders