code: def worker_init_fn(worker_id, num_workers, rank, seed):
      # The seed of each worker equals to
      # num_worker * rank + worker_id + user_seed
      worker_seed = num_workers * rank + worker_id + seed
      np.random.seed(worker_seed)
      random.seed(worker_seed)
  
file_path: insightface/detection/scrfd/mmdet/datasets/builder.py
imports: import copy
  import platform
  import random
  from functools import partial
  import numpy
  from mmcv.parallel import collate
  from mmcv.runner import get_dist_info
  from mmcv.utils import Registry, build_from_cfg
  from torch.utils.data import DataLoader
  from .samplers import DistributedGroupSampler, DistributedSampler, GroupSampler
label_desc: Use image node_id 4 for calling a global function with example usage: worker_init_fn(worker_id, num_workers, rank, seed) without return types