code: def _set_rng_states(rng_state_dict: Dict[str, Any]) -> None:
      r"""Set the global random state of :mod:`torch`, :mod:`torch.cuda`, :mod:`numpy` and Python in the current
      process."""
      torch.set_rng_state(rng_state_dict["torch"])
      # torch.cuda rng_state is only included since v1.8.
      if "torch.cuda" in rng_state_dict:
          torch.cuda.set_rng_state_all(rng_state_dict["torch.cuda"])
      np.random.set_state(rng_state_dict["numpy"])
      version, state, gauss = rng_state_dict["python"]
      python_set_rng_state((version, tuple(state), gauss))
  
file_path: pytorch-lightning/src/lightning/fabric/utilities/seed.py
imports: import logging
  import os
  import random
  from random import getstate
  from random import setstate
  from typing import Any, Dict, Optional
  import numpy
  import torch
  from lightning.fabric.utilities.rank_zero import _get_rank, rank_prefixed_message, rank_zero_only, rank_zero_warn
label_desc: Use image node_id 5 for calling a global function with example usage: _set_rng_states(rng_state_dict) without return types