code: def set_seed(seed, cuda=torch.cuda.is_available()):
      """Set seed values for random generators.
  
      Args:
          seed (int): Value used as a seed.
          cuda (bool, optional): If `True` sets the `cuda` seed also.
      """
      random.seed(seed)
      torch.manual_seed(seed)
      np.random.seed(seed)
      if cuda:  # pragma: no cover
          torch.cuda.manual_seed(seed)
          torch.cuda.manual_seed_all(seed)
  
file_path: pywick/pywick/cust_random.py
imports: from collections import namedtuple
  from contextlib import contextmanager
  import functools
  import random
  import numpy
  import torch
label_desc: Use image node_id 5 for calling a global function with example usage: set_seed(seed, cuda) without return types