class_docstr: This class is a manager of all random seeds involved in the system.
  
  Note:
      The parallel_mode should be concluded in ``ParallelMode``. More details about ``ParallelMode`` could be found
      in `parallel_mode <https://github.com/hpcaitech/ColossalAI/blob/main/colossalai/context/parallel_mode.py>`_.
docstr: Sets the current mode of the seed manager.
  
  Args:
      parallel_mode (:class:`colossalai.legacy.context.ParallelMode`): The chosen parallel mode.
code: def set_mode(self, parallel_mode: ParallelMode):
      """Sets the current mode of the seed manager.
  
      Args:
          parallel_mode (:class:`colossalai.legacy.context.ParallelMode`): The chosen parallel mode.
      """
      if self.current_mode:
          # save the current state for current mode
          self._seed_states[
              self._current_mode
          ] = torch.cuda.get_rng_state()
  
      # set the new state for new mode
      self._current_mode = parallel_mode
      torch.cuda.set_rng_state(self._seed_states[parallel_mode])
  
file_path: ColossalAI/colossalai/legacy/context/random/seed_manager.py
imports: import torch
  from torch import Tensor
  from colossalai.legacy.context.parallel_mode import ParallelMode
label_desc: Use image node_id 6 for calling the SeedManager obj's underlying member method code with example usage: obj.set_mode(parallel_mode) without return types