code: def setup_seed(seed, cuda_deterministic=True):
      torch.manual_seed(seed)
      torch.cuda.manual_seed_all(seed)
      np.random.seed(seed)
      random.seed(seed)
      os.environ["PYTHONHASHSEED"] = str(seed)
      if cuda_deterministic:  # slower, more reproducible
          torch.backends.cudnn.deterministic = True
          torch.backends.cudnn.benchmark = False
      else:  # faster, less reproducible
          torch.backends.cudnn.deterministic = False
          torch.backends.cudnn.benchmark = True
  
file_path: insightface/recognition/arcface_torch/utils/utils_distributed_sampler.py
imports: import math
  import os
  import random
  import numpy
  import torch
  import torch.distributed
  from torch.utils.data import DistributedSampler
label_desc: Use image node_id 1 for calling a global function with example usage: setup_seed(seed, cuda_deterministic) without return types