code: def get_train_pytorch_loader(args, num_workers, default_boxes):
      dataset = COCODetection(
          args.train_coco_root,
          args.train_annotate,
          SSDTransformer(default_boxes, args, (300, 300), val=False),
      )
  
      if args.distributed:
          train_sampler = (
              torch.utils.data.distributed.DistributedSampler(dataset)
          )
      else:
          train_sampler = None
  
      train_dataloader = DataLoader(
          dataset,
          batch_size=args.batch_size,
          shuffle=(train_sampler is None),
          sampler=train_sampler,
          drop_last=True,
          num_workers=num_workers,
      )
  
      return train_dataloader
  
file_path: DALI/docs/examples/use_cases/pytorch/single_stage_detector/src/data.py
imports: import os
  import numpy
  import torch
  from torch.utils.data import DataLoader
  from src.utils import dboxes300_coco, COCODetection, SSDTransformer
  from src.coco import COCO
  from src.coco_pipeline import create_coco_pipeline
  from nvidia.dali.plugin.pytorch import DALIGenericIterator, LastBatchPolicy
label_desc: Use image node_id 3 for calling a global function with example usage: get_train_pytorch_loader(args, num_workers, default_boxes) and returns: train_dataloader