code: def load_random_states(f: Any):
      """
      Load Python, Numpy and Pytorch's (both CPU and GPU) random states as saved by :func:`~poutyne.save_random_states()`.
  
      Args:
          f: a file-like object (has to implement :meth:`read`, :meth:`readline`, :meth:`tell`, and :meth:`seek`),
              or a string or os.PathLike object containing a file name
      """
      states = torch.load(f)
      torch.set_rng_state(states["cpu"])
      torch.cuda.set_rng_state_all(states["cuda"])
      np.random.set_state(states["numpy"])
      random.setstate(states["python"])
  
imports: import contextlib
  import numbers
  import os
  import random
  import warnings
  from typing import IO, Any, BinaryIO, Optional, Union
  import numpy
  import torch
  from torch.nn.utils.rnn import PackedSequence
  from torch.utils.data import Dataset
  from poutyne.warning_manager import warning_settings
label_desc: Use image node_id 11 for calling a global function with example usage: load_random_states(f) without return types