code: def _set_random_seeds(seed: int) -> None:
      # Set identical random seeds on all training processes.
      # When doing distributed training, each worker will start at a unique
      # offset in the dataset, ensuring that it is processing a unique
      # training batch.
      random.seed(seed)
      np.random.seed(seed)
      torch.random.manual_seed(seed)
  
file_path: determined/harness/determined/pytorch/_trainer.py
imports: import contextlib
  import logging
  import random
  import sys
  from typing import Any, Dict, Iterator, Optional
  import numpy
  import torch
  import torch.distributed
  import determined
  from determined import core, gpu, horovod, profiler, pytorch
  from determined.horovod import hvd
label_desc: Use image node_id 2 for calling a global function with example usage: _set_random_seeds(seed) without return types