code: def set_rng_state(rng_state: dict):
      try:
          torch_rng = rng_state["torch_rng"]
          torch.set_rng_state(torch_rng)
          print("Set torch rng state")
      except ValueError as e:
          warnings.warn(e)
  
      try:
          torch_rng_cuda = rng_state["torch_rng_cuda"]
          torch.cuda.set_rng_state(torch_rng_cuda)
          print("Set torch rng cuda state")
      except ValueError as e:
          warnings.warn(e)
  
      try:
          python_rng = rng_state["python_rng"]
          random.setstate(python_rng)
          print("Set python rng state")
      except ValueError as e:
          warnings.warn(e)
  
imports: import random
  import warnings
  import numpy
  import torch
label_desc: Use image node_id 3 for calling a global function with example usage: set_rng_state(rng_state) without return types