code: def set_seeds(args):
      torch.cuda.set_device(args.local_rank)
      device = torch.device("cuda")
  
      if args.distributed:
          args.seed = broadcast_seeds(args.seed, device)
          local_seed = (
              args.seed + torch.distributed.get_rank()
          ) % 2**32
          local_rank = torch.distributed.get_rank()
      else:
          local_seed = args.seed % 2**32
          local_rank = 0
  
      print("Rank", local_rank, "using seed = {}".format(local_seed))
  
      torch.manual_seed(local_seed)
      np.random.seed(seed=local_seed)
  
      return local_seed
  
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 1 for calling a global function with example usage: set_seeds(args) and returns: local_seed