code: def set_mode(parallel_mode: ParallelMode):
      """Sets the current mode of the seed manager.
  
      Args:
          parallel_mode (:class:`colossalai.legacy.context.ParallelMode`): The chosen parallel mode.
  
      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>`_.
      """
      _SEED_MANAGER.set_mode(parallel_mode)
  
file_path: ColossalAI/colossalai/legacy/context/random/_helper.py
imports: import functools
  from contextlib import contextmanager
  import torch.cuda
  from torch import Tensor
  from ..parallel_mode import ParallelMode
  from .seed_manager import SeedManager
label_desc: Use image node_id 5 for calling a global function with example usage: set_mode(parallel_mode) without return types