code: def set_seed(seed, n_gpus=None):
      """set and return seed"""
      if seed == -1:
          seed = int(time.time())
      random.seed(seed)
      np.random.seed(seed)
      torch.manual_seed(seed)
      if n_gpus is not None and n_gpus > 0:
          torch.cuda.manual_seed_all(seed)
      return seed
  
imports: import random
  import time
  import numpy
  import torch
label_desc: Use image node_id 2 for calling a global function with example usage: set_seed(seed, n_gpus) and returns: seed